[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.6.3/gcc/opts.c.~1~ 2011-02-17 23:51:57.000000000 +0100 +++ gcc-4.6.3/gcc/opts.c 2013-01-20 12:57:24.033682399 +0100 @@ -1696,6 +1696,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. */