[fpc-pascal] Compiler mode for code in rtl and rtl-extra

Noel Duffy noelduffy at xtra.co.nz
Mon May 11 08:50:55 CEST 2020


I've been beavering away at a fix for 
https://bugs.freepascal.org/view.php?id=37013 and I've run into 
something unexpected. When I try to build rtl-extra with my proposed 
patch applied, I get compiler errors for things like the use of result 
variables and var/out variables. I'm so used to these being available 
that I quite forgot there are modes where they're not.

My question is, first, what mode is the compiler using, and second, is 
this required for portability to other platforms?

Or am I completely misunderstanding this?

Example error messages:
sockets.inc(497,5) Error: Identifier not found "Result"

sockets.inc(510,53) Fatal: Syntax error, ":" expected but "identifier 
RES" found

for this definition:

   function convert_hextet(const s: ShortString; out res: Word): Boolean;

It's not a big deal to rewrite around these, but first I want to make 
sure I am correctly diagnosing the issue.



More information about the fpc-pascal mailing list