[fpc-pascal] fcl-passrc errors
Michael Van Canneyt
michael at freepascal.org
Sun Oct 13 11:26:25 CEST 2019
On Sun, 13 Oct 2019, Sven Barth via fpc-pascal wrote:
>>> Just type casting because the array is an array of pointers. I get these
>> errors otherwise "Incompatible types: got "Pointer"
>>> expected “TEntity"”. I could use a proper type in a generic array but I
>> don’t always do that.
>>
>> I didn't know you could do this in a for in loop. FPC eats this ?
>>
>
> It currently does, but it might as well be a bug in FPC. I'll have to cross
> check with Delphi.
Delphi does not allow it:
[dcc32 Error] Project1.dpr(18): E1019 For loop control variable must be simple local variable
I don't think this should be allowed, either.
>>
>> Not yet.
>>
>> I have no idea how you call the parser. Include files most
>> definitely work: the documentation generator uses fcl-passrc, and the
>> RTL/FCL is full of include files.
>>
>> Probably your invocation of the parser is simply wrong or missing some
>> arguments.
>>
>
> Could the missing ".inc" be the problem? I have not checked, but it could
> be that FPC always adds ".inc" if no extension is present.
Well spotted. I didn't notice that the extension was missing.
That will definitely not be done in fcl-passrc.
I was not aware FPC does this either. It's not documented, that's for sure:
https://www.freepascal.org/docs-html/current/prog/progsu40.html
Delphi also does not look for .inc files, I checked. It only adds extension
.pas
So, conclusion: FPC is way too lenient. ;-)
Michael.
More information about the fpc-pascal
mailing list