This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Disable -Wduplicated-cond for the time being


Given that the new warning currently breaks bootstrap [*] and I see
no simple way how to resolve PR67819 derived out of the bootstrap
failure, I'm moving -Wduplicated-cond out of -Wall and skipping one
of the tests for the time being.  I'm also reverting the hack in
genemit.c.

Oh well.

[*] https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00236.html

Bootstrapped/regtested on x86_64-linux, applying to trunk.

2015-10-02  Marek Polacek  <polacek@redhat.com>

	* genemit.c (gen_exp): Remove -Wduplicated-cond hack.

	* c.opt (Wduplicated-cond): Don't enable by -Wall anymore.

	* c-c++-common/Wduplicated-cond-2.c: Skip until PR67819 is resolved.

diff --git gcc/c-family/c.opt gcc/c-family/c.opt
index a79b9f1..c62eefb 100644
--- gcc/c-family/c.opt
+++ gcc/c-family/c.opt
@@ -407,7 +407,7 @@ C ObjC C++ ObjC++ Var(warn_div_by_zero) Init(1) Warning
 Warn about compile-time integer division by zero
 
 Wduplicated-cond
-C ObjC C++ ObjC++ Var(warn_duplicated_cond) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall)
+C ObjC C++ ObjC++ Var(warn_duplicated_cond) Init(0) Warning
 Warn about duplicated conditions in an if-else-if chain
 
 Weffc++
diff --git gcc/genemit.c gcc/genemit.c
index 13f9119..e92f757 100644
--- gcc/genemit.c
+++ gcc/genemit.c
@@ -182,7 +182,7 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used)
 	       && INTVAL (x) <= MAX_SAVED_CONST_INT)
 	printf ("const_int_rtx[MAX_SAVED_CONST_INT + (%d)]",
 		(int) INTVAL (x));
-      else if (STORE_FLAG_VALUE > 1 && INTVAL (x) == STORE_FLAG_VALUE)
+      else if (INTVAL (x) == STORE_FLAG_VALUE)
 	printf ("const_true_rtx");
       else
 	{
diff --git gcc/testsuite/c-c++-common/Wduplicated-cond-2.c gcc/testsuite/c-c++-common/Wduplicated-cond-2.c
index 90a8663..c424e76 100644
--- gcc/testsuite/c-c++-common/Wduplicated-cond-2.c
+++ gcc/testsuite/c-c++-common/Wduplicated-cond-2.c
@@ -1,6 +1,7 @@
 /* PR c/64249 */
 /* { dg-do compile } */
 /* { dg-options "-Wall" } */
+/* { dg-skip-if "PR67819" { *-*-* } } */
 
 #ifndef __cplusplus
 # define bool _Bool

	Marek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]