This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: 14035
Gabriel Dos Reis wrote:
Nathan Sidwell <nathan@codesourcery.com> writes:
| Mark Mitchell wrote:
|
| > On the other hand, I don't feel very strongly about that point of
| > view; if you and Jason think we should not issue a diagnostic, even
| > with -pedantic, that's OK with me. Perhaps we could change the
| > pedwarn into a warning? That would mean that it would not be an
| > error by default. (The fact that pedwarns are errors by default
| > seems confused to me anyhow, but that's something where Jason and I
| > can't seem to persuade each other.)
|
| A warning would be fine in pedantic mode.
I don't think -pedantic should be required.
I do think it should be required.
There's no point in warning by default about a technical violation of
the standard for code that works on virtually all systems. And I only
say "virtually" because I'm not sure what obscure systems exist of which
I am unaware; I do not know of any systems on which these casts would
actually fail.
As an additional data point, EDG does not warn by default about these casts.
--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com