This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: error while preprocessing on x86 with -std
- From: "John \(Eljay\) Love-Jensen" <eljay at adobe dot com>
- To: "Mike Frysinger" <vapier at gentoo dot org>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Sat, 13 Jan 2007 04:36:01 -0800
- Subject: RE: error while preprocessing on x86 with -std
- References: <200701122118.33651.vapier@gentoo.org>
Hi Mike,
> why does it work without -std ?
Then gcc uses it's best guess based on extension (.S).
> shouldnt it either pass or fail regardless of -std ?
No. If you use -std, then gcc is using the specified standard, not it's best guess.
As to which C standard -std defaults to... I don't know. Without testing, my guess would be -std is an undocumented shortcut for -std=c99 (for gcc), and -std=c++98 (for g++), but maybe -std is a shortcut for -ansi.
HTH,
--Eljay