How can I force long words to be 32 bits on DEC-ALPHA ?
Bill C Riemers
bcr@feynman.com
Sat Apr 1 00:00:00 GMT 2000
Robert Zitoun wrote:
>
> I have a C-program running on HP in which there are a lot of "unsigned
> long*" pointers.
> I try to port this program to DEC-ALPHA, but here, Unsigned long
> pointers point to 64 bit words.
>
> Is there any way to force the compiler to understand "long" as 32 bit on
> any machine ? (DEC ALPHA especially)
>
> Thank you for your help
>
> Robert
If you change the size of pointers, you are going have serious problems.
How can you possibly hope to address 64 bit memory space with 32 bit pointers????
Perhaps you aren't using them as pointers at all, but pointer offsets. In that
case I suspect you will have to modify the code just to use (long int) as indexes,
as any automatic porting procedure will get you into trouble.
On SGI machines there is a -n32 option, but I think that only sets the default
int size.
Bill
More information about the Gcc-help
mailing list