Do not warn about zero-as-null when NULL is used.
authorVille Voutilainen <ville.voutilainen@gmail.com>
Wed, 30 May 2018 19:33:38 +0000 (22:33 +0300)
committerVille Voutilainen <ville@gcc.gnu.org>
Wed, 30 May 2018 19:33:38 +0000 (22:33 +0300)
commit752e7593b0f19af233a0b7e72daab8413662b605
tree345bd42020e2f7a5f8d90544d04251d807f7db9c
parent298434c916c14e8adca2cab8a746aee29038c5b3
Do not warn about zero-as-null when NULL is used.

gcc/cp/

Do not warn about zero-as-null when NULL is used.
* call.c (conversion_null_warnings): Check for pointer
types converted from zero constants.
(convert_like_real): Add a warning sentinel at the end.
* tree.c (maybe_warn_zero_as_null_pointer_constant): Also
check null_node_p.

testsuite/

Do not warn about zero-as-null when NULL is used.
* g++.dg/warn/Wzero-as-null-pointer-constant-7.C: New.

From-SVN: r260973
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/tree.c
gcc/testsuite/g++.dg/warn/Wzero-as-null-pointer-constant-7.C [new file with mode: 0644]