Add OPT_Wextra to warning call
diff mbox

Message ID CAESRpQAyhyxy4hMepjd7RH+8vMHOesPG5F25M=3ATGZ_bCcvLw@mail.gmail.com
State New
Headers show

Commit Message

Manuel López-Ibáñez Aug. 15, 2014, 4:15 p.m. UTC
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.

Patch
diff mbox

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");
         }