re PR c++/51196 (FAIL: g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C)
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
This commit is contained in:
parent
56cb44d47d
commit
51e355aaab
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
|
|
@ -4056,6 +4056,13 @@ cp_build_binary_op (location_t location,
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue