[Ffmpeg-devel] Re: #define always_inline (hello?)

David Abrahams dave
Wed Jan 11 21:43:06 CET 2006

David Abrahams <dave at boost-consulting.com> writes:

> FFMPEG's use of 
>          #define always_inline
> is problematic.  The MacOS headers (and, presumably,
> other legitimate headers) use legal GCC constructs like:
>    static __inline__ __attribute__((always_inline)) 
>    return_type function_name() {  }
> which naturally is disrupted by any attempt to #define
> always_inline.  

Let me just clarify that when I say "is disrupted" I mean that
#defining always_inline causes these headers to generate /syntax

Let me also point restate that this is not a MacOS-only problem.

> I propose that FFMPEG use some other symbol for that
> purpose, preferably an ALL_UPPERCASE symbol beginning with FFMPEG_,
> e.g.
> Yes, GCC should have stayed out of our way by using a reserved
> identifier such as __always_inline__, but regardless, #defining
> non-prefixed lowercase macro names in library headers is always
> problematic because they tend to collide with identifiers in user
> code.  ALL_UPPERCASE names are, by convention, reserved for macros.
> Am I missing something important here?

Dave Abrahams
Boost Consulting

More information about the ffmpeg-devel mailing list