On Fri, 19 Mar 2021, Jakub Jelinek via Gcc-patches wrote:

> Hi!
> 
> As the following testcases show, compared to -D_Atomic= case we have many
> -Wunused-but-set-* warning false positives.
> When an _Atomic variable/parameter is read, we call mark_exp_read on it in
> convert_lvalue_to_rvalue, but build_atomic_assign does not.
> For consistency with the non-_Atomic case where we mark_exp_read the lhs
> for lhs op= ... but not for lhs = ..., this patch does that too.
> But furthermore we need to pattern match the trees emitted by _Atomic store,
> so that _Atomic store itself is not marked as being a variable read, but
> when the result of the store is used, we mark it.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to