Compiler issue...

Pavel Roskin pavel_roskin at geocities.com
Tue Jan 26 04:39:59 PST 1999


Hello!

>   i'm using a non-GNU compiler to compile kaffe code and obviously it 
> complains when it finds code using GNU extensions to C, like
> arithmetic on void pointers, arrays of length zero
> etc.

Could you please tell us which compiler you are using?

>   what is the best way to go about compiling with the same compiler 
> (without a GNU compiler) ?

Spend several hours/days changing GCC-specific code to a portable version.

>   can some one give ideas for arithmetic on void pointers problem in
> particular ?

May be you should cast them to (char *) ?
Could you please demonstrate where and how your compiler complains?

>   similarly, can someone give suggestions for changing the assembly code 
> (which seems to be understood only by GNU assembler) ?

When I wrote HP-UX specific code, the alternative for me was either to
write sysdepCallMethod as a routine in pure HP-UX assembler or write
everything in C having only one assembler instruction with arguments
from the C world. Arguments to the asm() directive is a GCC extension.
You should either find a similar construct in your assembler or try to
re-implement sysdepCallMethod in pure assembler for your machine.
Don't think that the first way is much simpler. It is very difficult to
use asm() without C arguments which would work correctly for any
optimization level.

Best wishes,
Pavel



More information about the kaffe mailing list