Paul Eggert wrote:
So it seems to me that the retionale for definining __STDC__ to 0 is:
"We allow code which is not strictly ANSI in this mode". This is also
true for the normal gcc mode!
That is a bug in GCC that should be fixed. I fixed it long ago for
GCC on Solaris: ot defines __STDC__ to be 1 in user code (though it is
still 0 in system headers, since that's what the Solaris system
headers want).
But if -std doesn't handle \x in strings, then it's not upward
compatible with C89, so it still seems to me that -std1 would
be more appropriate.
What exactly does -std1 disable? Why is it bad to use -std1?
The configure test for ansi-ness recognizes -std as an ANSI mode. In fact:
$ cat test.c
int main()
{
printf("%d\n", '\x00');
}
$ cc -o test test.c
./test
3158136
$ cc -std -o test test.c
./test
0
$ cc -std1 -o test test.c
./test
0
--
NicolÃs Lichtmaier.-
Synapsis Argentina
+54(11)4314-3000 (int. 231)