Re: [fpc-devel] {$mode tp} compatibility issue

2018-06-05 Thread Mattias Gaertner
On Tue, 5 Jun 2018 14:09:16 +0200 Klaus Hartnegg wrote: > Hi, > > I just stepped into a trap when compiling Turbo Pascal source with > FreePascal, and wonder how FreePascal could prevent this. > > The source effectively contains something like > > type >mytype = (a,b,c); > > var >t :

Re: [fpc-devel] {$mode tp} compatibility issue

2018-06-05 Thread Marco van de Voort
In our previous episode, Klaus Hartnegg said: > > Could FreePascal check that variables like "mytype = (a,b,c)" have size > 1 before using them in {$mode tp}? Otherwise they should be flaged as > incompatible type, to prevent such surprises. Not really, better edit your project to make sure tha

[fpc-devel] {$mode tp} compatibility issue

2018-06-05 Thread Klaus Hartnegg
Hi, I just stepped into a trap when compiling Turbo Pascal source with FreePascal, and wonder how FreePascal could prevent this. The source effectively contains something like type mytype = (a,b,c); var t : mytype; f : text; begin assign (f,'filename'); reset (f); readln (f,byte