Re: __gnu_inline__ and __artificial__

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 On 07/30/2010 09:07 AM, Nikolai Lazarov wrote:
Please, can you explain what exactly these two attributes do?



Semantics for 'inline' in ISO C99 and GNU90 differs.

If you're compiling with -std=gnu99 but want the GNU90 semantics, you would use
__attribute__ ((gnu_inline)) inline int func() { return 0; }

This is exactly the same like this compiled with -std=gnu89:
inline int func() { return 0; }

GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used.

About artificial, well, I'd be also interested.

Thanks,
Marek


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux