Still a lot of C++ files getting "fixed"
Martin v. Loewis
Tue Jan 25 14:49:00 GMT 2000
> True. But, -ansi is specifically documented to be pedantically ANSI;
> that's its whole purpose in life. So, either we should can it, or
> make sure it does what it's there fore.
It's documented to be ANSI (*) - it is not documented as being pedantic;
that's what -pedantic is there for.
-ansi should only select standard semantics when both interpretations
of some code are meaningful (where gcc picks GNU C semantics by
default). If the code is invalid for strict ANSI C, gcc should accept
it as an extension - you'd need -pedantic to have the compiler reject
On that ground, I think it is better to accept headers with C++
comments with -ansi, as this probably represents the usage of an
extension, rather than changing the meaning of the header from one
meaningful interpretation to another.
(*) even though it should be documented as being ISO :-)
More information about the Gcc-bugs