This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: [PATCH] Fix up definitions for older G++


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


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