http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56815

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-04-03 
09:40:30 UTC ---
(In reply to comment #7)
> In practice the warning (a pedwarn) is emitted by code shared with the C
> front-end, the error (a permerror, thus with -fpermissive it can be demoted to
> a warning, like the other) is emitted by the C++ front-end.
> 
> Manuel, should we try to be more consistent in C++? Should we specialize the
> code in c-common.c to have a permerror in C++ or should we relax the permerror
> to a pedwarn? I don't know but in any case I would rather not affect C.

Clang++ gives a hard-error, and from my experience, Gabriel and Jason usually
prefer to reject stuff that is forbidden by the standard rather than allow it
as a GNU extension. Since this is half-rejected anyway, it seems more natural
to reject it in full. You could use emit_diagnostic and choose whether to give
a DK_pedwarn or DK_permerror depending on whether we are in C++ or C.

Could you also adjust the messages to be exactly the same? I prefer the second
one (the one from the permerror) and Clang also uses that one (surely, copied
from GCC).

Reply via email to