This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: c99 inline patch for gcc 4.2
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, mark at codesourcery dot com
- Date: Mon, 12 Mar 2007 17:53:12 +0000 (UTC)
- Subject: Re: PATCH RFA: c99 inline patch for gcc 4.2
- References: <m3bqizp07s.fsf@localhost.localdomain>
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