-std=c89 is not the same as -ansi
Joseph S. Myers
jsm28@cam.ac.uk
Sun Apr 16 18:36:00 GMT 2000
This bug report applies to both gcc 2.95.2 and snapshot 2000-04-10, both
on i686-pc-linux-gnu.
-std=c89 is supposed to act the same as -ansi, but does not: the -std
version incorrectly defines macros such as "i386" in the application
namespace. This is incorrect for all the ISO C standard versions; unless
the C dialect selected is one of the GNU ones or traditional C, these
macros should not be defined.
$ gcc -std=c89 -E -
i386
^D
# 1 ""
1
$ gcc -ansi -E -
i386
^D
# 1 ""
i386
$
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc-bugs
mailing list