From: Ozkan S. <se...@gm...> - 2011-11-06 08:58:17
|
On Sat, Nov 5, 2011 at 10:24 PM, Vincent Torri <vin...@gm...> wrote: > > > On Sat, Nov 5, 2011 at 10:40 AM, Ozkan Sezer <se...@gm...> wrote: > >> However Vincent should note that he should also use underscored >> attribute names in his macro like: >> #define always_inline __attribute__((__always_inline__)) >> > > I actually have 2 questions: > > 1) the gcc documentation does not mention __always_inline__, but just > always_inline: > > http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html > > So is it really safe to use __always_inline__ or should I use it since some > specific version of gcc ? > To my knowledge, the double-underscore attribute names have always been supported to avoid clashes with user macros > 2) The documentation says also : "For functions declared inline, this > attribute inlines the function etc..." > > Should I define the following macro: > > #define ALWAYS_INLINE __attribute__((__always_inline__)) > > or that one (according to the doc) : > > #define ALWAYS_INLINE inline __attribute__((__always_inline__)) > > ? I don't know how you will use your macro, so I cannot have any advice on that > > thank you > > Vincent Torri -- O.S. |