This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [CONFIGUREY PATCH]: place -Wcast-qual and -Wc++-compat under -Werror
- From: "Kaveh R. GHAZI" <ghazi at caip dot rutgers dot edu>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dnovillo at google dot com, gdr at integrable-solutions dot net, richard dot guenther at gmail dot com
- Date: Sun, 29 Jun 2008 01:54:09 -0400 (EDT)
- Subject: Re: [CONFIGUREY PATCH]: place -Wcast-qual and -Wc++-compat under -Werror
- References: <Pine.GSO.4.58.0806262057540.25823@caipclassic.rutgers.edu> <m3vdzsyk92.fsf@google.com>
On Sat, 28 Jun 2008, Ian Lance Taylor wrote:
> "Kaveh R. GHAZI" <ghazi@caip.rutgers.edu> writes:
>
> > 2008-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
> >
> > * Makefile.in (CXX_COMPAT_WARN, cxx_compat_warn): Delete.
> > (bitmap.o-warn, dominance.o-warn): New.
> > * configure.ac (cxx_compat_warn): Delete.
> > (loose_warn): Add -Wcast-qual and -Wc++-compat.
> > * system.h: Remove #pragma diagnostic for -Wcast-qual and
> > -Wc++-compat.
> > * configure: Regenerate.
> >
> > cp:
> > * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
> >
> > java:
> > * Make-lang.in (java/jcf-io.o-warn): New.
>
> This is OK when it bootstraps without any other patches.
> Thanks.
> Ian
Well, it used to bootstrap. :-) I retested today before installing it and
there was one warning regression. Fixed by the patch below and installed
as obvious. I'll keep an eye out for problems, but given the
cross-compiling I did I hope there won't be any.
Thanks,
--Kaveh
2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* optabs.c (libfunc_decl_hash, libfunc_decl_eq): Fix -Wcast-qual
warnings.
diff -rup orig/egcc-SVN20080629/gcc/optabs.c egcc-SVN20080629/gcc/optabs.c
--- orig/egcc-SVN20080629/gcc/optabs.c 2008-06-29 02:02:14.000000000 +0200
+++ egcc-SVN20080629/gcc/optabs.c 2008-06-29 07:12:26.000000000 +0200
@@ -5992,13 +5992,13 @@ static GTY ((param_is (union tree_node))
static hashval_t
libfunc_decl_hash (const void *entry)
{
- return htab_hash_string (IDENTIFIER_POINTER (DECL_NAME ((tree) entry)));
+ return htab_hash_string (IDENTIFIER_POINTER (DECL_NAME ((const_tree) entry)));
}
static int
libfunc_decl_eq (const void *entry1, const void *entry2)
{
- return DECL_NAME ((tree) entry1) == (tree) entry2;
+ return DECL_NAME ((const_tree) entry1) == (const_tree) entry2;
}
rtx