On Fri, 4 Aug 2023, Martin Uecker via Gcc-patches wrote: > Here is a patch to reduce false positives in _Generic. > > Bootstrapped and regression tested on x86_64-linux. > > Martin > > c: _Generic should not warn in non-active branches [PR68193,PR97100] > > To avoid false diagnostics, use c_inhibit_evaluation_warnings when > a generic association is known to 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 > > 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.
OK. -- Joseph S. Myers jos...@codesourcery.com