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: Marek Polacek <polacek at redhat dot com>
- To: Andreas Jaeger <aj at suse dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 5 Sep 2012 17:29:04 +0200
- Subject: Re: [PATCH] Fix up definitions for older G++
- References: <20120831120003.GB3556@redhat.com><50465BDD.4030609@suse.com>
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,
Marek