This is the mail archive of the gcc-bugs@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]

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


> 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 :-)

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