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
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
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,