c++/5089: -Wold-style-cast warns about cast to void
Jeffrey Turner
jturner@mail.alum.rpi.edu
Wed Jan 2 10:56:00 GMT 2002
The following reply was made to PR c++/5089; it has been noted by GNATS.
From: "Jeffrey Turner" <jturner@mail.alum.rpi.edu>
To: <gcc-bugs@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>,
<llib@computer.org>,
<nathan@gcc.gnu.org>,
mputer.org@LOCALHOST,
<nathan@gcc.gnu.org>
Cc:
Subject: Re: c++/5089: -Wold-style-cast warns about cast to void
Date: Wed, 2 Jan 2002 14:02:59 -0500
>Synopsis: -Wold-style-cast warns about cast to void
>
>State-Changed-From-To: analyzed->closed
>State-Changed-By: nathan
>State-Changed-When: Wed Jan 2 05:59:02 2002
>State-Changed-Why:
> 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
>
> PR c++/5089
> * doc/invoke.texi (-Wold-style-cast): Only warn about non-void casts.
>
> 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
>
> PR c++/5089
> * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
I still think this is a mistake. If I want to be warned
about old-style casts then the compiler should _always_
oblige. It should be up to the programmer whether or not
to ignore compiler warnings. That was the premise of C.
I still think it's valid to let the programmer decide
rather than the stupid compiler. How else will we catch
all the archaic code that hopefully should be eliminated?
--Jeff Turner
Who put the Sam in the "'Sama Laden Ding-Dong"?
More information about the Gcc-prs
mailing list