[gambit-list] Gambit no longer compiles with Clang >= 3.7

Marc Feeley feeley at iro.umontreal.ca
Tue Jan 19 14:28:11 EST 2016


OK, my latest commit fixes this issue (tested on OS X).  Could you try on Ubuntu and let me know if issues persist?

Marc

> On Jan 19, 2016, at 8:51 AM, Alex Silva <asandroq at gmail.com> wrote:
> 
> Hallo,
> 
> On 19/01/16 14:39, Marc Feeley wrote:
>> Strange that this is undefined behavior in C.  Is it only when left shifting a constant or any signed integer expression?  In general I can understand it is undefined because it depends on the size of the integer type, but here ___TB is 3 so -7<<___TB will fit in any integer type including 8 bit integers!
>> 
> 
> The standard call those "expressions", so it shouldn't be limited to
> constants only. But those get caught during compile time. Interestingly,
> for right shifts the result is implementation-defined instead of undefined.
> 
>> Also, I don’t understand why gsi gets stuck.  After all you only got warnings.
>> 
> 
> Given the undefined behaviour the compiler can do whatever it wants,
> including optimizing those expressions away, but I am just guessing.
> 
>> Can you give more details, such as OS and Gambit versions?  I use the latest clang from Xcode and don’t have this problem.
>> 
> 
> This is Ubuntu 14.04 with Clang 3.7.1. I downloaded the LLVM binary
> distribution from http://www.llvm.org/. Gambit version 4.8.3.
> 
> Cheers,
> -- 
> -alex
> http://unendli.ch/
> 




More information about the Gambit-list mailing list