PATCH RFA: c99 inline patch for gcc 4.2

Joseph S. Myers joseph@codesourcery.com
Mon Mar 12 18:02:00 GMT 2007


On Mon, 11 Mar 2007, Ian Lance Taylor wrote:

> * If we see a non-static inline function:
>   + In C99 mode, issue a warning controlled by -fgnu89-inline.
>   + In all cases, apply GNU89 semantics.

To confirm: this does not apply to inline functions in system headers?

Please also update the documentation paragraphs

	Inline functions are included in the ISO C99 standard, but there are
	currently substantial differences between what GCC implements and what
	the ISO C99 standard requires.

and

	Since GCC eventually will implement ISO C99 semantics for
	inline functions, it is best to use @code{static inline} only
	to guarantee compatibility.  (The
	existing semantics will remain available when @option{-std=gnu89} is
	specified, but eventually the default will be @option{-std=gnu99} and
	that will implement the C99 semantics, though it does not do so yet.)

to state that 4.3 is when C99 semantics are implemented in C99 mode, and 
possibly to cross-reference the gnu_inline attribute, -fgnu89-inline 
option and predefined macros as other tools for compatibility.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list