[fpc-devel] Bug or Feature? Inline of code from Units does not work when types uses in code are defined in implementation
florian at freepascal.org
Mon Apr 6 18:59:39 CEST 2015
Am 06.04.2015 um 17:53 schrieb Michael Ring:
> Take the following unit, my goal is to have the code called in the unit
> inlined in the main code.
> This works fine when
> pLongWord = ^LongWord;
> is defined in the interface of the unit.
> if this is defined in Implementation then Inlining of the code does not
> Is this correct behaviour? Or should both ways work?
Inline is only a recommendation to the compiler. Such a definition in
the implementation part prevents indeed inlining.
In this particular case I recommend that you just leave the definition
away so compiler uses that one of the system unit.
More information about the fpc-devel