From: Jakub Jelinek <jakub@redhat.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] Handle -fwrapv -ftrapv (PR tree-optimization/48766)
Date: Mon, 14 Jan 2013 20:52:00 -0000 [thread overview]
Message-ID: <20130114205218.GS7269@tucnak.redhat.com> (raw)
Hi!
With this patch, -fno-[wt]rapv cancels corresponding -f[wt]rapv if any as
before, and later -f[wt]rapv disables -f[tw]rapv, which is IMHO better
behavior than if we use Negative(f[tw]rapv) on f[wt]rapv in common.opt.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2013-01-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/48766
* opts.c (common_handle_option): For -fwrapv disable -ftrapv, for
-ftrapv disable -fwrapv.
--- gcc/opts.c.jj 2013-01-11 09:02:48.000000000 +0100
+++ gcc/opts.c 2013-01-14 15:06:54.822968095 +0100
@@ -1755,6 +1755,16 @@ common_handle_option (struct gcc_options
/* No-op. Used by the driver and passed to us because it starts with f.*/
break;
+ case OPT_fwrapv:
+ if (value)
+ opts->x_flag_trapv = 0;
+ break;
+
+ case OPT_ftrapv:
+ if (value)
+ opts->x_flag_wrapv = 0;
+ break;
+
default:
/* If the flag was handled in a standard way, assume the lack of
processing here is intentional. */
Jakub
next reply other threads:[~2013-01-14 20:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 20:52 Jakub Jelinek [this message]
2013-01-14 22:24 ` Joseph S. Myers
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=20130114205218.GS7269@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.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).