[fpc-devel] "inline" issue
J. Gareth Moreton
gareth at moreton-family.com
Fri Apr 26 23:51:07 CEST 2019
Well the issue listed fixes the problems I found in the compiler, RTL
and the packages that are built. Basically anything that returned an
error with my modified code (which demanded that "inline" cannot appear
in the implementation section by itself, so much more strict) - I'm not
sure if there will be side-effects or not.
It depends on what Jonas and Florian want in the end, but I'll be happy
to put something together that allows inline to conform with Delphi etc.
Gareth aka. Kit
On 26/04/2019 22:20, Sven Barth via fpc-devel wrote:
> Am 26.04.2019 um 22:41 schrieb J. Gareth Moreton:
>> On 26/04/2019 21:29, Sven Barth via fpc-devel wrote:
>>> 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.
>> I did. I did talk with Jonas privately about the issue, because I
>> did try to fix the compiler so you couldn't do this. The problem is,
>> a lot of stuff broke, including code in the System unit and the
>> compiler itself. Take a look:
> There are two different points:
> - for methods of classes/records/objects the "inline" directive must
> either be in the interface section or not be used at all
> - for normal routines "inline" might appear only in the implementation
> section, but then it can be inlined *only* inside the same unit; for
> other units the routine would appear as if it had no "inline" directive
> Thus only those cases where a method has "inline" in its
> implementation must be fixed (this will then have to be mentioned on
> the User Changes Trunk wiki page), for the global routines these *can*
> be fixed to improve inlining again. But they won't break compilation.
> fpc-devel maillist - fpc-devel at lists.freepascal.org
This email has been checked for viruses by Avast antivirus software.
More information about the fpc-devel