From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix PR61564 - optimize attribute/pragma accepting any option
Date: Tue, 07 Jun 2016 08:21:00 -0000 [thread overview]
Message-ID: <20160607082137.GN7387@tucnak.redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1606071011100.1493@t29.fhfr.qr>
On Tue, Jun 07, 2016 at 10:15:39AM +0200, Richard Biener wrote:
>
> This fixes PR61564 by diagnosing (and ignoring) options not marked with
> 'Optimization' being applied to #pragma GCC optimize or via the
> optimize attribute.
>
> The reason is that while we save/restore option state for 'Optimize'
> marked options we don't do that for other options. Thus while such
> options do not end up in the per-function optimize state applying them
> still clobbers the global state.
>
> Bootstrap and regtest running on x86_64-unknown-linux-gnu.
>
> Ok for trunk?
Ok (though it surprises me we haven't done that from the beginning).
> 2016-06-07 Richard Biener <rguenther@suse.de>
>
> PR c/61564
> * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
> options and warn about others.
>
> * gcc.dg/Wpragmas-1.c: New testcase.
> * gcc.dg/Wattributes-4.c: Likewise.
Jakub
next prev parent reply other threads:[~2016-06-07 8:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 8:15 Richard Biener
2016-06-07 8:21 ` Jakub Jelinek [this message]
2016-06-07 8:22 ` Richard Biener
2016-06-07 12:16 ` Richard Biener
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=20160607082137.GN7387@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--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).