[fpc-devel]C style
Matti Hamalainen
mhamalai at ratol.fi
Fri Jan 12 16:12:43 CET 2001
On Fri, 12 Jan 2001, Peter Vreman wrote:
> Macro's with parameters aren't implemented becuase they can be replaced better with inline
> functions. IIRC there was also a note from Linus on the kernel list prefere a solution
> with static;inline functions above a macro, because inlining also adds more type safety.
How are the inline-functions implemented in FPC? When using macros, I can
have (for example) two versions of it, one stub (empty) and one having
some code on it. Good for debugging, since when compiled with no debug,
no extra code gets generated.
As far as I understand, the above is not possible (in exactly same
way) with inlined functions, since a reference to a function (which
would not exist) generates an error.
So the question is: Does an stub inline function with no code except
for "begin end;" generate 'extra' code?
If not, then you (I) could replace macros with inline functions.
(Yes, I know that I could check this myself, but I'm just too lazy ;-)
= ccr/TNSP - mhamalai at ratol.fi | http://www.tnsp.org/ =
= Foo is a synonym for Bar, but not vice versa. =
More information about the fpc-devel
mailing list