diff mbox

[C++] Fixes for duplicate warnings regressions [1/2]

Message ID 529328AC.3030301@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Nov. 25, 2013, 10:38 a.m. UTC
... evidently I attached the wrong p ;) This should be right one.

Paolo.
diff mbox

Patch

Index: c-common.c
===================================================================
--- c-common.c	(revision 205343)
+++ c-common.c	(working copy)
@@ -4579,10 +4579,11 @@  c_common_truthvalue_conversion (location_t locatio
 	if (decl_with_nonnull_addr_p (inner))
 	  {
 	    /* Common Ada/Pascal programmer's mistake.  */
-	    warning_at (location,
-			OPT_Waddress,
-			"the address of %qD will always evaluate as %<true%>",
-			inner);
+	    if (c_inhibit_evaluation_warnings == 0)
+	      warning_at (location,
+			  OPT_Waddress,
+			  "the address of %qD will always evaluate as %<true%>",
+			  inner);
 	    return truthvalue_true_node;
 	  }
 	break;