This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PING] [PATCH/C++/diagnostic] Be extra pedantic about stray semicolons


On 21 Mar 2007 16:19:41 -0500, Gabriel Dos Reis <gdr@cs.tamu.edu> wrote:
"Manuel López-Ibáñez" <lopezibanez@gmail.com> writes:

| 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.


Thanks for the clarification. I think GNU C++ has chosen to classify them as hard errors unless you give -fpermissive, am I wrong? Nevertheless, your wording is more correct.

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


Basically, what I said with different words. It is nice that we agree on something for a change ;-).

By the way, Dirk, your patch does not have a testcase for the actual
diagnostic (please use dg-warning or dg-error as appropriate) and I
think the test for system headers is redundant since the diagnostics
machinery should not emit diagnostics for system headers unless
Wsystem-headers.

Cheers,

Manuel.


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