aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/opts.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 975b878..6b4f1d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/48766
+ * opts.c (common_handle_option): For -fwrapv disable -ftrapv, for
+ -ftrapv disable -fwrapv.
+
2013-01-14 Georg-Johann Lay <avr@gjlay.de>
PR target/55974
diff --git a/gcc/opts.c b/gcc/opts.c
index 245e191da..bd1b2dc 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -1755,6 +1755,16 @@ common_handle_option (struct gcc_options *opts,
/* 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. */