[PING] [PATCH/C++/diagnostic] Be extra pedantic about stray semicolons
Gabriel Dos Reis
Wed Mar 21 21:00:00 GMT 2007
"Manuel López-Ibáñez" <firstname.lastname@example.org> writes:
| On 21/03/07, Mike Stump <email@example.com> 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 :-)
More information about the Gcc-patches