This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Handling of extern inline in c99 mode
- From: Daniel Jacobowitz <drow at false dot org>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, Andrew Pinski <pinskia at gmail dot com>, Geoffrey Keating <geoffk at apple dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 1 Nov 2006 14:03:10 -0500
- Subject: Re: Handling of extern inline in c99 mode
- References: <2F4A331E-BB1F-4E0A-98E5-DF337E926B79@apple.com> <1162359635.19236.1.camel@celery.andrew.com> <m34ptj5f4g.fsf_-_@dhcp-172-18-118-195.corp.google.com> <Pine.LNX.4.64.0611011839240.20040@digraph.polyomino.org.uk>
On Wed, Nov 01, 2006 at 06:59:42PM +0000, Joseph S. Myers wrote:
> I'd rather simply fix glibc to work with C99 inline semantics. For the
> above you might use
>
> #define tolower(c) __tolower_inline(c)
> static __inline __attribute__((__always_inline__)) int tolower_inline ...
>
> and #undef tolower when defining the out of line function. That would
> apply to all cases where a user-visible function in a header is currently
> inlined directly; for a purely internal function in the header, we can
> arrange for all declarations to use "inline" without "extern" when in C99
> mode.
Isn't the whole point that the current extern inline isn't
__always_inline__, but leaves it to the compiler's judgement?
--
Daniel Jacobowitz
CodeSourcery