Skip to content
Snippets Groups Projects
Commit 54be3385 authored by Martin Uecker's avatar Martin Uecker
Browse files

c: _Generic should not warn in non-active branches [PR68193,PR97100,PR110703]

To avoid false diagnostics, use c_inhibit_evaluation_warnings when
a generic association is known to not match during parsing.  We may
still generate false positives if the default branch comes earler than
a specific association that matches.

PR c/68193
PR c/97100
PR c/110703

gcc/c/:
	* c-parser.cc (c_parser_generic_selection): Inhibit evaluation
	warnings branches that are known not be taken during parsing.

gcc/testsuite/ChangeLog:
	* gcc.dg/pr68193.c: New test.
parent 5b42ee2c
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