[PATCH] c: Fix -Wunused-but-set-* warning with _Generic [PR96571]

Joseph Myers joseph@codesourcery.com
Mon Aug 17 22:14:54 GMT 2020


On Fri, 14 Aug 2020, Jakub Jelinek via Gcc-patches wrote:

> Hi!
> 
> The following testcase shows various problems with -Wunused-but-set*
> warnings and _Generic construct.  I think it is best to treat the selector
> and the ignored expressions as (potentially) read, because when they are
> parsed, the vars in there are already marked as TREE_USED.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Gcc-patches mailing list