[fpc-devel] "inline" issue

Sven Barth pascaldragon at googlemail.com
Fri Apr 26 22:29:58 CEST 2019


Am 26.04.2019 um 18:29 schrieb J. Gareth Moreton:
> That's good to know - thanks Sven.
>
> This might be a silly question, but what error messages do you get if 
> you put "inline" in a method's implementation etc? I'm wondering if I 
> should develop a patch that ensures the conformance for inline matches 
> in {$MODE DELPHI}.
It's "Ungültige Compileranweisung: 'INLINE'" ("Invalid compiler 
directive: 'INLINE'"). As we don't have a corresponding general message 
for this maybe a specific one for "inline" is sufficient.
>
> For FPC, I would personally like to keep the ability to have "inline" 
> in the implementation section and allow it to affect the function 
> outside of the unit if only because it's beneficial from a 
> cross-platform perspective (e.g. a number of functions in the System 
> unit), while Delphi is fairly confined to Windows.
>
> What are the administrators' thoughts?
You did read what Jonas said in the bug report? Adding "inline" in the 
implementation section for the interface section would need to lead to a 
change of the interface CRC which is a no-go once the interface section 
has been handled (and has lead to enough problems in the past, so fixing 
this remaining problem is definitely important). If another unit should 
inline something then the "inline" directive needs to be in the 
interface section, because that's the purpose of the interface section.

Regards,
Sven



More information about the fpc-devel mailing list