Commit b7e7f412 by Paolo Carlini Committed by Paolo Carlini

re PR c++/65323 (duplicate -Wzero-as-null-pointer-constant warnings)

2015-03-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65323
	* decl.c (check_default_argument): Don't call
	maybe_warn_zero_as_null_pointer_constant.

From-SVN: r221402
parent 2960e09d
2015-03-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/65323
* decl.c (check_default_argument): Don't call
maybe_warn_zero_as_null_pointer_constant.
2015-03-11 Aldy Hernandez <aldyh@redhat.com>
* cp-gimplify.c (simple_empty_class_p): New.
......
......@@ -11229,11 +11229,10 @@ check_default_argument (tree decl, tree arg, tsubst_flags_t complain)
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))
/* Avoid redundant -Wzero-as-null-pointer-constant warnings at
the call sites. */
if (TYPE_PTR_OR_PTRMEM_P (decl_type)
&& null_ptr_cst_p (arg))
return nullptr_node;
/* [dcl.fct.default]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment