]> git.ipfire.org Git - thirdparty/gcc.git/commit
Exclude calls to variadic lambda stubs from -Wnonnull checking (PR c++/95984).
authorMartin Sebor <msebor@redhat.com>
Mon, 6 Jul 2020 21:23:37 +0000 (15:23 -0600)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:16:26 +0000 (13:16 -0300)
commit9a388bce59117ed8e82912653a69019e5ff8c0dd
treed0a277e13af7ddf1d088a919c7e24da860098722
parentf21957ece31f36d338cdf0d64b2ff14d755f351f
Exclude calls to variadic lambda stubs from -Wnonnull checking (PR c++/95984).

Resolves:
PR c++/95984 - Internal compiler error: Error reporting routines re-entered in -Wnonnull on a variadic lamnda
PR c++/96021 - missing -Wnonnull passing nullptr to a nonnull variadic lambda

gcc/c-family/ChangeLog:

PR c++/95984
* c-common.c (check_function_nonnull): Avoid checking syntesized calls
to stub lambda objects with null this pointer.
(check_nonnull_arg): Handle C++ nullptr.

gcc/cp/ChangeLog:

PR c++/95984
* call.c (build_over_call): Check calls only when tf_warning is set.

gcc/testsuite/ChangeLog:

PR c++/95984
* g++.dg/warn/Wnonnull6.C: New test.
gcc/c-family/c-common.c
gcc/cp/call.c
gcc/testsuite/g++.dg/warn/Wnonnull6.C [new file with mode: 0644]