Fix PR c++/96310 - Ignoring -Wnonnull via pragma gcc diagnostics still produces an...
authorMartin Sebor <msebor@redhat.com>
Sat, 25 Jul 2020 20:21:47 +0000 (14:21 -0600)
committerMartin Sebor <msebor@redhat.com>
Sat, 25 Jul 2020 20:24:24 +0000 (14:24 -0600)
commite0633768a1a2efe689e5505b3a95aa949d704b06
treea9e31ce6ccb77f15b15ef50a3db7a32180034f14
parent8d0b2b33748014ee57973c1d7bc9fd7706bb3da9
Fix PR c++/96310 - Ignoring -Wnonnull via pragma gcc diagnostics still produces an unwanted note.

gcc/c-family/ChangeLog:
PR c++/96310
* c-common.c (check_nonnull_arg): Print note only when warning was
issued.
gcc/c-family/c-common.c
gcc/testsuite/g++.dg/warn/Wnonnull8.C [new file with mode: 0644]