This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFA: Improve -Wcast-qual warning for C
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 1 Jun 2009 13:46:47 +0000 (UTC)
- Subject: Re: PATCH RFA: Improve -Wcast-qual warning for C
- References: <m33aasxvqh.fsf@google.com> <Pine.LNX.4.64.0905292033270.18075@digraph.polyomino.org.uk> <m3k53zdumr.fsf@google.com>
On Fri, 29 May 2009, Ian Lance Taylor wrote:
> > I think you should also add a C++ testcase that is essentially identical
> > to the C one to verify that the same semantics are being followed for the
> > option by both front ends.
>
> Done.
>
> Here is the updated patch. Bootstrapped and tested on
> x86_64-unknown-linux-gnu. The second patch in
> http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01608.html
> is unchanged.
>
> Ian
>
>
> gcc/ChangeLog:
>
> 2009-05-29 Ian Lance Taylor <iant@google.com>
>
> * c-typeck.c (handle_warn_cast_qual): New static function,
> partially broken out of build_c_cast.
> (build_c_cast): Call handle_warn_cast_qual.
> * doc/invoke.texi (Warning Options): Document new effect of
> -Wcast-qual.
>
> gcc/testsuite/ChangeLog:
>
> 2009-05-29 Ian Lance Taylor <iant@google.com>
>
> * gcc.dg/cast-qual-3.c: New testcase.
The C changes are OK.
> * g++.dg/warn/Wcast-qual2.C: New testcase.
--
Joseph S. Myers
joseph@codesourcery.com