[C PATCH] Kill bogus warnings on _Atomics (PR c/60195)

Joseph S. Myers joseph@codesourcery.com
Tue Feb 18 23:44:00 GMT 2014


On Tue, 18 Feb 2014, Marek Polacek wrote:

> This PR is about bogus warnings on _Atomics.  E.g., for _Atomic int,
> the warning "right-hand operand of comma has no effect" makes no sense.  One
> problem was that when making COMPOUND_EXPR out of atomic variable, we create
> artificial variable via create_tmp_var, but we shouldn't warn on those.  So
> I've set TREE_NO_WARNING on such variables.
> Another issue is that we warned that a variable is unused, even when it's
> actually used in __atomic_load; mark_exp_read fixed it.
> 
> Also I noticed a typo, so fixed (s/val/old/).
> 
> Regtested/bootstrapped on x86_64-linux, ok for 5.0?  (Or 4.9 instead?)

OK for 4.9.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list