[fpc-devel] Inline methods

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Jan 16 14:13:47 CET 2013


On 16 Jan 2013, at 14:06, Ludo Brands wrote:

> On 16/01/2013 13:17, Jonas Maebe wrote:
>>
>> Are those calls before or after the method body appears in the  
>> source code? The compiler cannot inline anything for which it  
>> hasn't parsed the source code yet.
>>
> The method was implemented below the code that used it. Moving it up  
> solved it.
>
> Actually the "inline;' in the declaration is not really used.  
> Removing it results in the same code. Perhaps a Hint or Warning when  
> inline is used in the declaration could avoid these mistakes.

Actually, the correct behaviour would be that the compiler requires  
that it is only specified in the interface, or both in the interface  
and in the implementation (I'm not sure yet what's most appropriate).  
Inlining is always also enabled across units and hence should have to  
be specified in the interface.


Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20130116/2e6c427a/attachment.html>


More information about the fpc-devel mailing list