This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] fix-includes for darwin's math.h testing __APPLE_CC__ instead of __GNUC__
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: mrs at apple dot com (Mike Stump)
- Cc: gcc-patches at gcc dot gnu dot org (patch Patches), geoffk at geoffk dot org (Geoffrey Keating), bkorb at gnu dot org, pinskia at physics dot uc dot edu (Andrew Pinski)
- Date: Wed, 10 Aug 2005 13:45:30 -0400 (EDT)
- Subject: Re: [PATCH] fix-includes for darwin's math.h testing __APPLE_CC__ instead of __GNUC__
>
> On Aug 9, 2005, at 11:12 AM, Andrew Pinski wrote:
> > For the following testcase:
> >
> > #include <math.h>
> > const volatile static float arg2_float_23 = NAN;
> >
> > NAN should be allowed in this situation as allowed by C99
> > but since darwin's headers do:
> > #if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)
>
> Newer OSes do:
>
> #if defined(__GNUC__)
>
> Do you seem any problems doing that? If not, then I think I'd rather
> do that.
Yes because it is not correct as GCC 3.2 or 3.1 did not have __builtin_nan().
Anyways I am going to do what Bruce suggested (and approved) and just turn it to "#if 1"
as we are always using the fix included headers with the version which was just built.
-- Pinski