Re: [cfe-users] Boost.GIL test failing with clang 5.x while pass with 15 gcc/clang versions

2018-05-21 Thread Mateusz Loskot via cfe-users
On 21 May 2018 at 20:08, Mateusz Loskot wrote: > On 21 May 2018 at 19:27, Jan Korous wrote: >> >> You are hitting UB because of signed integer overflow. >> [...] >> >> BTW This is a perfect opportunity to try out UndefinedBehaviorSanitizer! >> >> https://clang.llvm.org/docs/UndefinedBehaviorSanit

Re: [cfe-users] Boost.GIL test failing with clang 5.x while pass with 15 gcc/clang versions

2018-05-21 Thread Mateusz Loskot via cfe-users
On 21 May 2018 at 19:27, Jan Korous wrote: > > You are hitting UB because of signed integer overflow. > [...] > > BTW This is a perfect opportunity to try out UndefinedBehaviorSanitizer! > > https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html > >> clang++ -fsanitize=signed-integer-overflow

Re: [cfe-users] Boost.GIL test failing with clang 5.x while pass with 15 gcc/clang versions

2018-05-21 Thread Jan Korous via cfe-users
Hi Mateusz, You are hitting UB because of signed integer overflow. ISO/IEC 14882:2011 clause 5 paragraph 4 and ISO/IEC 14882:2017 clause 8 paragraph 4 “If during the evaluation of an expression, the result is not mathematically defined or not in the range of representable values for its type,