[Ffmpeg-devel] #define always_inline

Dave Dodge dododge
Sun Jan 15 03:18:36 CET 2006


On Sun, Jan 08, 2006 at 02:37:58PM -0500, David Abrahams wrote:
>    static __inline__ __attribute__((always_inline)) 
>    return_type function_name() {  }

> Yes, GCC should have stayed out of our way by using a reserved
> identifier such as __always_inline__,

Just FYI recent versions of gcc do support that, for precisely this
reason.  From the gcc (3.3.2) manual:

  You may also specify attributes with `__' preceding and following
  each keyword.  This allows you to use them in header files without
  being concerned about a possible macro of the same name.  For example,
  you may use `__noreturn__' instead of `noreturn'.

It's up to the people writing the headers to choose the safer __
style.  A quick check of my Linux system here shows that glibc
typically uses __ itself, but the kernel headers it references do not.

                                                  -Dave Dodge





More information about the ffmpeg-devel mailing list