re PR c++/56373 (-Wzero-as-null-pointer-constant: does not catch issues with smart...
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 20 Feb 2013 09:02:35 +0000 (09:02 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 20 Feb 2013 09:02:35 +0000 (09:02 +0000)
commit30b07d033db90fb3722583c3210be1ab63679e3f
treecbcd275676d34b52a33ccb3271c62f8b35e99dd6
parentbbe4fb2cec6aa90490c3524d783165bd369b18b0
re PR c++/56373 (-Wzero-as-null-pointer-constant: does not catch issues with smart pointers)

/cp
2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/56373
* tree.c (maybe_warn_zero_as_null_pointer_constant): Add.
* cvt.c (ocp_convert): Use the latter.
(cp_convert_to_pointer): Likewise.
* decl.c (check_default_argument): Likewise.
* typeck.c (cp_build_binary_op): Likewise.
* cp-tree.h (maybe_warn_zero_as_null_pointer_constant): Declare.

/testsuite
2013-02-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/56373
* g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C: New.

From-SVN: r196165
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/cvt.c
gcc/cp/decl.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C [new file with mode: 0644]