Joseph S. Myers - Re: Clean up extern inline (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

On Fri, 1 Feb 2007, Ian Lance Taylor wrote:

We do need such an option in 4.3 and later because Ulrich will not accept Jakub's glibc patch (he'll only accept header fixes but not fixes to the rest of glibc). Adding it to 4.1/4.2 seems reasonable if it makes it more convenient for glibc to use this option.

I'd add that -fno-gnu-extern-inline should be an error in 4.1/4.2, and more generally in c89/gnu89 modes (the number of language dialects should be minimised). But adding any diagnostics for this to 4.1 branch would be a mistake; it would make upgrading from 4.1.2 to 4.1.3 unsafe for some users. (I don't think we should add such deprecation warnings to past release branches once they've had a release from them, at all, ever.)

Changing the definition of gnu89 in this regard is wrong, in any version at all. The gnu89 dialect has the defined semantics (in fact, the option should probably be called -fgnu89-extern-inline instead to make it clear that gnu89 semantics are being selected). The future behavior of both gnu89 and gnu99 has been promised in the documentation ever since my patch

2001-05-21 Joseph S. Myers jsm28@cam.ac.uk

    * extend.texi: Clarify documentation of extensions included in ISO
    C99.  Prefer C99 terminology and syntax to old GNU terminology and
    syntax.  Add more index entries.  Document mixed declarations and
    code as an extension in C89 mode.  Warn about future changes to
    semantics of inline functions.  Fixes PR other/930.

added the paragraph:

+For future compatibility with when GCC implements ISO C99 semantics for +inline functions, it is best to use @code{static inline} only. (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.)

The rules (for 4.3 and later) should be:

-- Joseph S. Myers joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]