I'm trying to build Mercury with LLVM-GCC (which ships with Xcode 4):<br><br>  gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)<br><br>The beta fixes one problem with Boehm GC, but now I'm getting other errors:<br>

<br>  tree234.c:598: error: initializer element is not constant<br>  tree234.c:598: error: (near initialization for ‘mercury_common_1[0].f2’)<br>  …<br><br>This seems to be related with the definition of MR_mkword in runtime/mercury_tags.h:<br>

<br>  #define    MR_mkword(t, p) ((MR_Word *)((char *)(p) + (t)))<br><br>Both p and t are integers here, and therefore (char *)(p) is implementation-defined behaviour. I tried to change it to ((MR_Word *)((p) + (t))) which makes it compile fine, but then I'm getting segfaults at runtime (I assume this is because the MR_word points to the wrong address). What exactly are you trying to do here? Any way to do it without casting integers to pointers (which is implementation-defined behaviour)?<br clear="all">

<br>// Magnus Holm<br>