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 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


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