Skip to content
Snippets Groups Projects
Commit 459c8a55 authored by Marek Polacek's avatar Marek Polacek
Browse files

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: default avatarJason Merrill <jason@redhat.com>
parent 24ea4539
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment