* [CONFIGUREY PATCH]: place -Wcast-qual and -Wc++-compat under -Werror
@ 2008-06-27 1:26 Kaveh R. GHAZI
2008-06-29 5:52 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Kaveh R. GHAZI @ 2008-06-27 1:26 UTC (permalink / raw)
To: gcc-patches; +Cc: dnovillo, gdr, iant, richard.guenther
I'm far enough along that I can do this now. :-) This patch moves
-Wcast-qual and -Wc++-compat under -Werror like the rest of our warnings.
There are a few nits left, however getting this in will prevent warning
regressions.
This patch relies on the following remaining warning cleanup patches:
targets: http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01680.html
ada: http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01710.html
toplev stragglers: http://gcc.gnu.org/ml/gcc-patches/2008-06/msg01711.html
Bootstrapped on x86_64-unknown-linux-gnu, okay for mainline once the above
are installed?
Thanks,
--Kaveh
(Note: there are a couple of ada and libgcc warnings left, but they don't
conflict with -Werror so we can get this in now and treat those
separately.)
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.
diff -rup orig/egcc-SVN20080626/gcc/Makefile.in egcc-SVN20080626/gcc/Makefile.in
--- orig/egcc-SVN20080626/gcc/Makefile.in 2008-06-26 02:02:09.000000000 +0200
+++ egcc-SVN20080626/gcc/Makefile.in 2008-06-27 02:21:20.000000000 +0200
@@ -160,10 +160,8 @@ coverageexts = .{gcda,gcno}
# STRICT_WARN are the additional warning flags to
# apply to the back end and the C front end, which may be compiled
# with other compilers.
-# CXX_COMPAT_WARN are C++ source compatibility warnings.
LOOSE_WARN = @loose_warn@
STRICT_WARN = @strict_warn@
-CXX_COMPAT_WARN = @cxx_compat_warn@
# This is set by --enable-checking. The idea is to catch forgotten
# "extern" tags in header files.
@@ -189,6 +187,10 @@ build/gengtype-lex.o-warn = -Wno-error
SYSCALLS.c.X-warn = -Wno-strict-prototypes -Wno-error
# dfp.c contains alias violations
dfp.o-warn = -Wno-error
+# bitmap.c contains -Wc++compat warnings.
+bitmap.o-warn = -Wno-error
+# dominance.c contains a -Wc++compat warning.
+dominance.o-warn = -Wno-error
# All warnings have to be shut off in stage1 if the compiler used then
# isn't gcc; configure determines that. WARN_CFLAGS will be either
diff -rup orig/egcc-SVN20080626/gcc/configure.ac egcc-SVN20080626/gcc/configure.ac
--- orig/egcc-SVN20080626/gcc/configure.ac 2008-06-15 02:02:20.000000000 +0200
+++ egcc-SVN20080626/gcc/configure.ac 2008-06-27 02:18:20.000000000 +0200
@@ -323,8 +323,7 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZE
# So, we only use -pedantic if we can disable those warnings.
ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwrite-strings -Wstrict-prototypes \
- -Wmissing-prototypes], [loose_warn])
-ACX_PROG_CC_WARNING_OPTS([-Wc++-compat], [cxx_compat_warn])
+ -Wmissing-prototypes -Wcast-qual -Wc++-compat], [loose_warn])
ACX_PROG_CC_WARNING_OPTS([-Wold-style-definition \
-Wmissing-format-attribute], [strict_warn])
ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long -Wno-variadic-macros \
diff -rup orig/egcc-SVN20080626/gcc/cp/Make-lang.in egcc-SVN20080626/gcc/cp/Make-lang.in
--- orig/egcc-SVN20080626/gcc/cp/Make-lang.in 2008-06-22 02:02:33.000000000 +0200
+++ egcc-SVN20080626/gcc/cp/Make-lang.in 2008-06-27 02:18:20.000000000 +0200
@@ -89,7 +89,7 @@ CXX_OBJS = cp/cp-lang.o stub-objc.o $(CX
c++_OBJS = $(CXX_OBJS) dummy-checksum.o cc1plus-checksum.o cp/g++spec.o
# Use strict warnings for this front end.
-cp-warn = $(STRICT_WARN) $(CXX_COMPAT_WARN)
+cp-warn = $(STRICT_WARN)
cc1plus-dummy$(exeext): $(CXX_OBJS) dummy-checksum.o $(BACKEND) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
diff -rup orig/egcc-SVN20080626/gcc/java/Make-lang.in egcc-SVN20080626/gcc/java/Make-lang.in
--- orig/egcc-SVN20080626/gcc/java/Make-lang.in 2008-06-22 02:02:32.000000000 +0200
+++ egcc-SVN20080626/gcc/java/Make-lang.in 2008-06-27 02:21:01.000000000 +0200
@@ -101,6 +101,9 @@ jvspec.o-warn = -Wno-error
# Bison-1.75 output often yields (harmless) -Wtraditional warnings
java/parse.o-warn = -Wno-error
+# java/jcf-io.c contains a -Wc++compat warning.
+java/jcf-io.o-warn = -Wno-error
+
jc1$(exeext): $(JAVA_OBJS) $(BACKEND) $(LIBDEPS) attribs.o
rm -f $@
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
diff -rup orig/egcc-SVN20080626/gcc/system.h egcc-SVN20080626/gcc/system.h
--- orig/egcc-SVN20080626/gcc/system.h 2008-06-19 22:58:16.000000000 +0200
+++ egcc-SVN20080626/gcc/system.h 2008-06-27 02:18:20.000000000 +0200
@@ -797,11 +797,9 @@ extern void fancy_abort (const char *, i
#define CONST_CAST_RTX(X) CONST_CAST(struct rtx_def *, (X))
#define CONST_CAST_BB(X) CONST_CAST(struct basic_block_def *, (X))
-/* Activate -Wcast-qual and -Wc++-compat as warnings (not errors via
- the -Werror flag). */
+/* Activate certain diagnostics as warnings (not errors via the
+ -Werror flag). */
#if GCC_VERSION >= 4003
-#pragma GCC diagnostic warning "-Wcast-qual"
-#pragma GCC diagnostic warning "-Wc++-compat"
/* If asserts are disabled, activate -Wuninitialized as a warning (not
an error/-Werror). */
#ifndef ENABLE_ASSERT_CHECKING
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [CONFIGUREY PATCH]: place -Wcast-qual and -Wc++-compat under -Werror
2008-06-27 1:26 [CONFIGUREY PATCH]: place -Wcast-qual and -Wc++-compat under -Werror Kaveh R. GHAZI
@ 2008-06-29 5:52 ` Ian Lance Taylor
2008-06-29 7:13 ` Kaveh R. GHAZI
0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2008-06-29 5:52 UTC (permalink / raw)
To: Kaveh R. GHAZI; +Cc: gcc-patches, dnovillo, gdr, richard.guenther
"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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [CONFIGUREY PATCH]: place -Wcast-qual and -Wc++-compat under -Werror
2008-06-29 5:52 ` Ian Lance Taylor
@ 2008-06-29 7:13 ` Kaveh R. GHAZI
0 siblings, 0 replies; 3+ messages in thread
From: Kaveh R. GHAZI @ 2008-06-29 7:13 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-patches, dnovillo, gdr, richard.guenther
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-29 5:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-27 1:26 [CONFIGUREY PATCH]: place -Wcast-qual and -Wc++-compat under -Werror Kaveh R. GHAZI
2008-06-29 5:52 ` Ian Lance Taylor
2008-06-29 7:13 ` Kaveh R. GHAZI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).