This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
In message <orvh2projv.fsf@garnize.lsd.ic.unicamp.br>you write: > --=-=-= > > The following code snippet, by Geoff Keating, is valid ANSI/ISO C, > however it does not compile on AIX 4.* because stdio.h includes > sys/limits.h that includes float.h that defines FLT_RADIX. > > #include <stdio.h> > enum { FLT_RADIX = 30; } > int foo(void) { return FLT_RADIX; } > > One simple way to fix this is to define _ANSI_C_SOURCE, that prevents > sys/limits.h from including float.h. So I arranged for -ansi to > define _ANSI_C_SOURCE, just like it defines __STRICT_ANSI__ for GNU > libc to enable strict ANSI/ISO compliance. There are two separate > patch files. The second applies only to the newppc branch; while > first applies to mainline and the branch. Ok to install? Actually, I'd wonder if we should always define _ANSI_C_SOURCE, unless -traditional was given. Remember, by default GCC is an (almost) ANSI compiler. jeff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |