2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51196
* typeck.c (cp_build_binary_op, [case EQ_EXPR]): For targets having
TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_delta, do here
the -Wzero-as-null-pointer-constant warning for pmf == 0.
From-SVN: r181620
+2011-11-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51196
+ * typeck.c (cp_build_binary_op, [case EQ_EXPR]): For targets having
+ TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_delta, do here
+ the -Wzero-as-null-pointer-constant warning for pmf == 0.
+
2011-11-21 Torvald Riegel <triegel@redhat.com>
* pt.c (tsubst_copy_and_build): Handle TRANSACTION_EXPR.
delta0,
integer_one_node,
complain);
+
+ if ((complain & tf_warning)
+ && c_inhibit_evaluation_warnings == 0
+ && !NULLPTR_TYPE_P (TREE_TYPE (op1)))
+ warning (OPT_Wzero_as_null_pointer_constant,
+ "zero as null pointer constant");
+
e2 = cp_build_binary_op (location,
EQ_EXPR, e2, integer_zero_node,
complain);