Do not warn about zero-as-null when NULL is used.
commit4c0f678183325edc3208156bb53a676ac49ac86d
authorville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 May 2018 19:33:38 +0000 (30 19:33 +0000)
committerville <ville@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 May 2018 19:33:38 +0000 (30 19:33 +0000)
tree345bd42020e2f7a5f8d90544d04251d807f7db9c
parent2469c2e771fa5ab1479b1a4d081d9e335db308ad
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260973 138bc75d-0d04-0410-961f-82ee72b054a4
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]