public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/44321] attribute warn_unused_result fails under inlining.
Date: Sat, 29 May 2010 17:46:00 -0000 [thread overview]
Message-ID: <20100529174608.12433.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44321-14373@http.gcc.gnu.org/bugzilla/>
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-05-29 17:46 -------
(In reply to comment #3)
> I don't think this bug is of any use. Unlike nonnull, unused return values do
> not trigger undesirable optimizations and (as far as I can tell) cannot
> possibly result in miscompilation.
>
> This bug is indeed about a loophole, and one that could indeed cause some bugs
> (even security bugs). But, fixing it would also make it impossible for many
> projects to use -Werror, since they have to deal with the fact that __wur was
> used inappropriately by glibc.
>
> Adding another attribute and making __wur overridable BTW would not be a
> solution since glibc would certainly switch to the new __really_wur attribute
> and we'd be in the same situation. :-)
True, but if int dummy = foo() works then we can also make (void) foo ()
work.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44321
next prev parent reply other threads:[~2010-05-29 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-29 11:33 [Bug middle-end/44321] New: " davek at gcc dot gnu dot org
2010-05-29 11:33 ` [Bug middle-end/44321] " davek at gcc dot gnu dot org
2010-05-29 11:40 ` rguenth at gcc dot gnu dot org
2010-05-29 17:32 ` bonzini at gnu dot org
2010-05-29 17:46 ` rguenth at gcc dot gnu dot org [this message]
2010-05-30 6:43 ` bonzini at gnu dot org
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=20100529174608.12433.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).