diff mbox

[C++] PR 65323

Message ID 54F97C51.50308@oracle.com
State New
Headers show

Commit Message

Paolo Carlini March 6, 2015, 10:07 a.m. UTC
... in case, I think we can as well apply the below, a tad simpler. Also 
passes testing.

Paolo.

////////////////
diff mbox

Patch

Index: decl.c
===================================================================
--- decl.c	(revision 221230)
+++ decl.c	(working copy)
@@ -11227,11 +11227,8 @@  check_default_argument (tree decl, tree arg, tsubs
 				     LOOKUP_IMPLICIT);
   --cp_unevaluated_operand;
 
-  if (warn_zero_as_null_pointer_constant
-      && TYPE_PTR_OR_PTRMEM_P (decl_type)
-      && null_ptr_cst_p (arg)
-      && (complain & tf_warning)
-      && maybe_warn_zero_as_null_pointer_constant (arg, input_location))
+  if (TYPE_PTR_OR_PTRMEM_P (decl_type)
+      && null_ptr_cst_p (arg))
     return nullptr_node;
 
   /* [dcl.fct.default]