This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix up definitions for older G++
- From: Andreas Jaeger <aj at suse dot com>
- To: libc-alpha at sourceware dot org
- Cc: Marek Polacek <polacek at redhat dot com>
- Date: Thu, 06 Sep 2012 09:52:22 +0200
- Subject: Re: [PATCH] Fix up definitions for older G++
- References: <20120831120003.GB3556@redhat.com> <50465BDD.4030609@suse.com> <20120905152904.GB14722@redhat.com>
On Wednesday, September 05, 2012 17:29:04 Marek Polacek wrote:
> On Tue, Sep 04, 2012 at 09:51:57PM +0200, Andreas Jaeger wrote:
> > The test is:
> > #if !defined __cplusplus || __GNUC_PREREQ (4,3)
> >
> > So, the negation would be:
> > C++ and !(GCC >= 4.3) - which means also a non-gcc compiler.
>
> Correct.
>
> > What about
> > #elif defined __GNUC__
> > /* C++ and GCC < 4.3. */
> >
> > >+# define __extern_inline extern __inline
> > >+# define __extern_always_inline \
> > >+ extern __always_inline
> >
> > #else
> >
> > and then defining them as empty.
>
> Yes, but in this case, when using non-GCC compiler and !defined
> __cplusplus, we take the first #if block anyway. So perhaps we could
> use
> #if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__
> instead. Should I make this change as well? Thanks,
I guess that's the best alternative for now,
Thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126