From: Marek Polacek <polacek@redhat.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"Joseph S. Myers" <joseph@codesourcery.com>,
Jakub Jelinek <jakub@redhat.com>,
Jonathan Wakely <jwakely@redhat.com>
Subject: Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)
Date: Mon, 07 Mar 2016 13:34:00 -0000 [thread overview]
Message-ID: <20160307133434.GQ10006@redhat.com> (raw)
In-Reply-To: <CAFULd4bFn2sOwLEp3UQ-1hZXMAzHW_gvnmATGtxYGwFicLHJKQ@mail.gmail.com>
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 <polacek@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
next prev parent reply other threads:[~2016-03-07 13:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 18:17 Uros Bizjak
2016-03-07 13:34 ` Marek Polacek [this message]
2016-03-18 15:46 ` Uros Bizjak
2016-03-18 16:02 ` Uros Bizjak
-- strict thread matches above, loose matches on Subject: below --
2016-03-04 17:30 Marek Polacek
2016-03-04 17:41 ` Jakub Jelinek
2016-03-04 18:03 ` Marek Polacek
2016-03-04 18:20 ` Jakub Jelinek
2016-03-07 13:33 ` Marek Polacek
2016-03-14 11:48 ` Marek Polacek
2016-03-17 17:24 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160307133434.GQ10006@redhat.com \
--to=polacek@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=joseph@codesourcery.com \
--cc=jwakely@redhat.com \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).