MaskRay added a comment.

> Currenly both Clang and GCC support the following set of flags that control

code gen of signed overflow:

> [...]
> Howerver, clang ignores these flags for __builtin_abs(int) and its 
> higher-width

versions, so passing minimum integer value always causes poison.

This paragraph reads as if GCC emits a trap for `__builtin_abs` in -ftrapv 
mode, but it doesn't. That said, its `-fsanitize=signed-integer-overflow` does 
handle `__builtin_abs`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156821/new/

https://reviews.llvm.org/D156821

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to