On Mon, 9 Sep 2002, David O'Brien wrote: > On Sun, Sep 08, 2002 at 11:50:17PM -0400, Garrett Wollman wrote: > > GCC used to define a macro __STRICT_ANSI__ when `-ansi' was given on > > the command line. The current version does not do this, > > It seems to work for me:
For me too. I vaguely remember that it didn't work for all cases, but I can't find any broken case now (perhaps gcc-3.2 unbroke it). > The problem is it is also set for this: > > $ /usr/bin/cc -std=c99 foo.c > foo.c:2:2: #error __STRICT_ANSI__ > > As you mentioned, this is now not a good test to decide if 'long long' is > supported. The __STDC_VERSION__ test in the XXX comment before the __STRICT_ANSI__ ifdef works for -std=c99. A messy ifdef to handle old compilers seems to be unavoidable until we drop support for nonstandard (non-C90) features in old compilers. BTW, I'm still waiting for the bogus LONGLONG lint markup to be removed from stdlib.h. lint should warn about "long long" if and only if "ong long" is a syntax error for the compiler that lint is checking for. Lint must see the same value for __LONG_LONG_SUPPORTED as the relevant compiler would, and then the LONGLONG markup is a no-op. The markup mainly breaks detection of broken lints and/or broken setting of __LONG_LONG_SUPPORTED. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message