[PATCH]: Activate -Wc++-compat as a warning only

Kaveh R. GHAZI ghazi@caip.rutgers.edu
Thu Jun 19 08:01:00 GMT 2008


This patch activates -Wc++-compat as a warning during bootstrap.  The
intention is to fix all the warnings and then put it under -Werror like
other warnings to avoid regressions.  This should help with the gcc-in-cxx
branch effort.  There's about 1000 warnings, fixing them requires merely
adding a cast in most cases.  (Assistance fixing these is sought after and
welcome!)

Bootstrapped on x86_64-unknown-linux-gnu.

Okay for mainline?

		Thanks,
		--Kaveh


2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* system.h (-Wcast-qual): Activate as a warning only.

diff -rup orig/egcc-SVN20080619/gcc/system.h egcc-SVN20080619/gcc/system.h
--- orig/egcc-SVN20080619/gcc/system.h	2008-04-13 02:01:17.000000000 +0200
+++ egcc-SVN20080619/gcc/system.h	2008-06-19 08:10:23.000000000 +0200
@@ -797,9 +797,11 @@ 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 as a warning (not an error/-Werror).  */
+/* Activate -Wcast-qual and -Wc++-compat 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



More information about the Gcc-patches mailing list