This is the mail archive of the 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: [PING] [PATCH/C++/diagnostic] Be extra pedantic about stray semicolons

"Manuel López-Ibáñez" <> writes:

| On 21/03/07, Mike Stump <> wrote:
| > On Mar 21, 2007, at 3:35 AM, Dirk Mueller wrote:
| > >         * g++.old-deja/g++.brendan/warnings2.C: Don't use -pedantic.
| > >       * g++.dg/other/static1.C: Remove stray semicolon.
| > [ ... ]
| > >         * g++.old-deja/g++.bob/inherit1.C: Likewise.
| >
| > I reviewed the testsuite changes, and irrespective of the other
| > changes, I think they should be put in.
| >
| > Given the largeness of the testsuite fixes, and given most of these
| > came from code, I do wonder if we'd be better off with a separate
| > switch to turn the error/warning off so people can migrate their code.
| >
| If it is in pedantic, it is because the warning is mandated by the
| standard, exactly what people should expect from pedantic. It is

The standard does not mandate warning.  It mandates diagnostics.
We (GNU C++) have chosed to classify some of them as just warning
instead of hard errors -- also known as pedwarn.

| interesting to be able to enable warnings without enabling pedantic.
| But if you enable pedantic, I understand that you want to get the
| warnings mandated by the standard.

-pedantic usally means adherence to the letter of the standard.  So,
I'm inclined NOT to introduce yet another knob for this.  People are
routinely asking the compiler to be more compliant; it is the least to
expect that, in return, they are willing to adhere to the standard :-)

-- Gaby

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