Closed tueda closed 7 years ago
Failed with clang
?? https://travis-ci.org/tueda/form/builds/253705758 (See Issue219
.)
I am not quite sure what you mean with this. On the apple my fix worked.
Jos
On 15 jul. 2017, at 19:28, Takahiro Ueda notifications@github.com wrote:
Failed with clang?? https://travis-ci.org/tueda/form/builds/253705758 https://travis-ci.org/tueda/form/builds/253705758 (See Issue219.)
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/vermaseren/form/issues/219#issuecomment-315549444, or mute the thread https://github.com/notifications/unsubscribe-auth/AFLxEl68SGltY3d7AIHR2YKuPQTTK6iuks5sOPaggaJpZM4OVjKn.
It seems that the following code gave an error with clang
in macOS on Travis CI:
#$n64 = -2^63;
L F64 = {`$n64'};
P;
.end
You need to turn on the optimization. Probably something hits on an undefined behaviour, which compilers are allowed to discard smartly. In the following link you can play with "Run" with/without "Optimization": https://wandbox.org/permlink/Bhe1uTtaJ4niW9Z5
I guess
if ( answer < 0 ) { answer = -answer; }
is already undefined for answer=-9223372036854775808
(overflow in signed arithmetic). See https://godbolt.org/g/oX98bo, in which gcc completely skips a conditional branch with -O1
.
The preprocessor calculator prints the minimum negative number wrongly.
Presumably for the same reason as in #139.