From: Joseph Myers <joseph@codesourcery.com>
To: Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Richard Biener <rguenther@suse.de>
Subject: Re: [C PATCH] Warn for optimize attribute on decl after definition (PR c/70255)
Date: Mon, 09 May 2016 22:15:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1605092215310.31474@digraph.polyomino.org.uk> (raw)
In-Reply-To: <20160509144510.GA20450@redhat.com>
On Mon, 9 May 2016, Marek Polacek wrote:
> In this PR, Richi pointed out that we don't warn for the case when a
> declaration with attribute optimize follows the definition which is lacking
> that attribute. This patch adds such a warning. Though the question is
> whether this shouldn't apply to more attributes than just "optimize". And,
> as can be seen in the testcase, we'll warn for even for the case when the
> definition has
> optimize ("no-associative-math,O2")
> and the declaration
> optimize ("O2,no-associative-math")
> Not sure if we have something better than attribute_value_equal, though.
>
> (The C++ FE lacks these kind of warnings; I opened PR71024 for that.)
>
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2016-05-09 22:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 14:45 Marek Polacek
2016-05-09 22:15 ` Joseph Myers [this message]
2016-05-10 3:53 ` Martin Sebor
2016-05-10 10:03 ` Marek Polacek
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=alpine.DEB.2.20.1605092215310.31474@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=polacek@redhat.com \
--cc=rguenther@suse.de \
/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).