PATCH RFC: Fix enum comparisons

Manuel López-Ibáñez lopezibanez@gmail.com
Thu Sep 4 20:06:00 GMT 2008


@@ -409,6 +409,11 @@
 	     can turn it off only if it's not explicit.  */
 	  if (warn_main == -1)
 	    warn_main = (value ? 2 : 0);
+
+	  /* In C, -Wall turns on -Wenum-compare, which we do here.
+	     In C++ it is on by default, which is done in
+	     c_common_post_options.  */
+	  warn_enum_compare = value;
 	}
       else
 	{


This will make -Wno-enum-compare -Wall enable -Wenum-compare. Is that
what you want? I know some of the flags *do* behave like this but we
are slowly fixing them.

Cheers,

Manuel.



More information about the Fortran mailing list