Hi, Roger Scudder!
On 12 Sep 97 00:12:00 you wrote to Jerry Coffin
JC> if an inline function will work, it's better than a macro. It
JC> will generally eliminate the same function call overhead that a
JC> macro is usually intended to eliminate. Later, Jerry.
RS> But inline is only a request.
YEs, that is really a hint to the compiler. But in practice I saw the
compiler will take it unless you override it yourself with other settings
given (explicit request to outline all functions in debug build, size
limitation settings for inline functions and so on.)
RS> The compiler does not have to
RS> place the code inline.
I think an any good compiler will not ignore the request without a strong
reason.
RS> Would the same apply to a macro?
Definitely no. But does it really worth it? You can easily introduce strange,
hard to find bugs. Where using inline functions give you and the compiler
opportunity to catch them at compile time.
Paul
... I don't see you, so don't pretend to be there
--- OS/2 Warp
---------------
* Origin: The FlintStones' Cave in BedRock (2:371/20)
|