Still a lot of C++ files getting "fixed"

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
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
it.

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.

Regards,
Martin

(*) even though it should be documented as being ISO :-)


More information about the Gcc-bugs mailing list