See PR 48580 for discussion of possible approaches for representing overflow detection and handling (and, in particular, making -ftrapv work properly and making -fwrapv and -ftrapv affect the IR generated by front ends instead of being global flags), both in GIMPLE and at the C source level.
-- Joseph S. Myers jos...@codesourcery.com