This is the mail archive of the gcc-help@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]
Other format: [Raw text]

RE: error while preprocessing on x86 with -std


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]