On Nov 25, 2013, at 1:14 AM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
> I don't know why GCC isn't actually implementing -ftrapv on x86
Well, to be fair, that should be "why llvm-gcc isn't ..." - llvm-gcc may behave differently from regular gcc in a number of ways, given that the back end is completely different (some -W checks simply don't work in llvm-gcc; as I remember, some of the "not set before use" checks don't actually catch anything with llvm-gcc, although they *do* work with clang - perhaps the GCC front end is expecting the back end to do some work that the LLVM back end is expecting the front-end to do, but Clang does that work).
As for GCC, there appear to be some bugs about -ftrapv on x86-64, at least:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39771
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35412
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40143
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19020