[backport from gcc-4.8/trunk r195186 ] gcc/ 2013-01-15 Jakub Jelinek PR tree-optimization/48766 * opts.c (common_handle_option): For -fwrapv disable -ftrapv, for -ftrapv disable -fwrapv. --- gcc-4.7.2/gcc/opts.c.~1~ 2012-01-10 17:27:55.000000000 +0100 +++ gcc-4.7.2/gcc/opts.c 2013-01-20 12:55:48.333962148 +0100 @@ -1744,6 +1744,16 @@ common_handle_option (struct gcc_options opts->x_warn_maybe_uninitialized = value; 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. */