On Fri, Mar 18, 2016 at 4:33 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Mon, Mar 7, 2016 at 2:34 PM, Marek Polacek <pola...@redhat.com> wrote: >> 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. > > I have committed the attached revert after bootstrap on > x86_64-linux-gnu {,-m32}. There were no warnings when compiling > guard.cc. > > 2016-03-18 Uros Bizjak <ubiz...@gmail.com> > > Revert: > 2015-07-02 Uros Bizjak <ubiz...@gmail.com> > > * libsupc++/guard.cc (__test_and_acquire): Use __p after __atomic_load > to avoid unused variable warning. > (__set_and_release): Use __p after __atomic_store to avoid unused > variable warning.
Whoops, I looked at the wrong part of the build log ... unfortunately, the warning still happens, and I have to revert the revert ... Sorry for the noise, Uros.