[PATCH] Add OPT_Wextra to warning call

Manuel López-Ibáñez lopezibanez@gmail.com
Fri Aug 15 16:15:00 GMT 2014


I committed the below as obvious  in r214026.

Since the condition is already controlled by extra_warnings, the only
different is that we now print [-Wextra] and that -Werror=extra now
works.

Cheers,

Manuel.
-------------- next part --------------
Index: gcc/cp/ChangeLog
===================================================================
--- gcc/cp/ChangeLog	(revision 214023)
+++ gcc/cp/ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2014-08-15  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
+
+	* call.c (build_conditional_expr_1): Use OPT_Wextra in warning.
+
 2014-08-14  Paolo Carlini  <paolo.carlini@oracle.com>
 
 	* typeck.c (composite_pointer_type, cxx_sizeof_or_alignof_type,
Index: gcc/cp/call.c
===================================================================
--- gcc/cp/call.c	(revision 214023)
+++ gcc/cp/call.c	(working copy)
@@ -5017,7 +5017,7 @@
 					type_promotes_to (arg3_type)))))
         {
           if (complain & tf_warning)
-            warning_at (loc, 0, "enumeral and non-enumeral type in "
+            warning_at (loc, OPT_Wextra, "enumeral and non-enumeral type in "
 			"conditional expression");
         }
 


More information about the Gcc-patches mailing list