Inlining fails on very simple code

Peter Barada pbarada@mail.wm.sps.mot.com
Wed Dec 12 07:46:00 GMT 2001


>And it also says:
>"Defining inline functions (as fast as macros)."
>which is simply not true because I cannot force gcc to inline 
>the function without increasing the general limit which I cannot
>afford while with macros (although ugly) I can exactly control
>which code I'd like to have expanded where. Maybe we can introduce some
>__attribute__ ((i_really_want_this_inline)) to get the desired effect
>of finegrained control if the compiler cannot be made clever enough
>to even catch simple and obvious win cases.

>From section 4.32 of the documentation (version 2.95):

If you specify both 'inline' and 'extern' in the fuction definition,
then the definition used only for inlining.  In no case is the
function compiled on its own, not even if you refer to its address
explicitly.  Such an address becomes an external reference, as if you
had only declared the function, and had not defined it.


-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)



More information about the Gcc mailing list