http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48766
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-14 14:24:32 UTC --- Created attachment 29161 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29161 gcc48-pr48766.patch Untested fix. Seems in the previous option processing the negative options cancel their corresponding positive options (and vice versa), and only the last occurrence of the option from the command line remains and the patch just disables -fwrapv if -ftrapv comes after -fwrapv, and vice versa. So e.g. -fwrapv -ftrapv -fwrapv results in -fwrapv -fwrapv -ftrapv results in -ftrapv -fwrapv -ftrapv -fno-wrapv results in -ftrapv -ftrapv -fwrapv -fno-trapv results in -fwrapv etc.