[Bug c++/115580] [12/13/14/15 regression] null pointer warning from an unevaluated context
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 5 21:24:01 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115580
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:
https://gcc.gnu.org/g:8c635072ae68f60f14333cf113e75fa25a55becf
commit r14-11387-g8c635072ae68f60f14333cf113e75fa25a55becf
Author: Marek Polacek <polacek@redhat.com>
Date: Tue Mar 4 13:07:27 2025 -0500
c++: disable -Wnonnull in unevaluated context [PR115580]
This PR complains that we issue a -Wnonnull even in a decltype.
This fix disables even -Wformat and -Wrestrict. I think that's fine.
PR c++/115580
gcc/c-family/ChangeLog:
* c-common.cc (check_function_arguments): Return early if
c_inhibit_evaluation_warnings.
gcc/testsuite/ChangeLog:
* g++.dg/warn/Wnonnull16.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
(cherry picked from commit 459c8a55567b06522e4b9cc0a4ef62f9d3024526)
More information about the Gcc-bugs
mailing list