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

Alex Silva asandroq at gmail.com
Tue Jan 19 03:35:12 EST 2016


Hallo,

Just a heads up: While compiling Gambit, Clang displays the following
warning (thousands of times):

```

_gambitgsc.c:27730:1: warning: shifting a negative signed value is
undefined [-Wshift-negative-value]
___DEF_NEW_SYM_GLO(___S_xmm5,___S_xmm6,___X3334,376674065,___G_xmm6)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../include/gambit.h:5487:35: note: expanded from macro '___DEF_NEW_SYM_GLO'
___EXP_DATA(___glo_struct,glo) = {___UNB1, ___FIX(hash), 0}; \
                                  ^~~~~~~
../include/gambit.h:2098:38: note: expanded from macro '___UNB1'
#define ___UNB1 ((___CAST(___WORD,-7)<<___TB)+___tSPECIAL)
                  ~~~~~~~~~~~~~~~~~~~^

```

This is indeed undefined behaviour according to the C standard[1]. The
resulting `gsi` gets stuck when started and must be killed with SIGKILL.

[1] http://stackoverflow.com/a/22883850/341446

Cheers,
-- 
-alex
http://unendli.ch/



More information about the Gambit-list mailing list