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

2020-08-17 Thread Joseph Myers
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

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

2020-08-14 Thread Jakub Jelinek via Gcc-patches
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/regt