On Fri, Mar 04, 2016 at 07:17:46PM +0100, Uros Bizjak wrote: > Hello! > > > This is not a regression but I thought I'd post this anyway. Martin > > reported > > that we generate -Wunused-value warnings on the attached testcase, which > > arguable doesn't make sense. Setting TREE_USED suppresses the warning. > > Since > > we already compute 'fetch_op' I used that. (This warning doesn't trigger > > e.g. > > for __atomic_load/store/compare.) > > > > Bootstrapped/regtested on x86_64-linux, ok for trunk or gcc7? > > > > 2016-03-04 Marek Polacek <pola...@redhat.com> > > > > PR c/69407 > > * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch > > operations. > > > > * gcc.dg/atomic-op-6.c: New test. > > You can probably revert my workaround [1] that suppressed these > warnings in libsupc++/guard.cc.
Ah, thanks for the heads-up, I'll do that once I get the patch in. > [1] https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00023.html Marek