[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ocaml build failure on ia64 with gcc4



On Wed, 2005-08-10 at 19:13 +0200, Julien Cristau wrote:
> Hi,
> 
> the ocaml debian package fails to build on ia64 with the new gcc, with
> errors in byterun/interp.c:
> gcc -DCAML_NAME_SPACE -O -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o interp.o interp.c
> interp.c: In function 'caml_interprete':
> interp.c:297: error: invalid lvalue in increment
> interp.c:299: error: invalid lvalue in increment
> interp.c:301: error: invalid lvalue in increment
> interp.c:303: error: invalid lvalue in increment
> ...
> 
> (A full build log is available at
> http://buildd.debian.org/fetch.php?&pkg=ocaml&ver=3.08.3-6&arch=ia64&stamp=1123386582&file=log&as=raw)
> 
> The problem seems to be the "Next" macro, which is different on ia64
> than on other archs:
> #  ifdef DEBUG
> #    define Next goto next_instr
> #  else
> #    ifdef __ia64__
> #      define Next goto *(void *)(jumptbl_base + *((uint32 *) pc)++)
> #    else
> #      define Next goto *(void *)(jumptbl_base + *pc++)
> #    endif
> #  endif
> 
> I believe that using the following on ia64 instead should work, but
> since I am no expert, I'd like to get the caml team's advice :)
> (I don't really understand why this cast is there, 

The bug is:

  (uint32*)pc

is an rvalue and cannot be incremented. If this EVER worked
on a C compiler, that compiler is bugged.


-- 
John Skaller <skaller at users dot sourceforge dot net>

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: