pointers and longs

BLARSON at USC-ECLB.ARPA BLARSON at USC-ECLB.ARPA
Thu Jul 19 19:42:56 AEST 1984


From:  Bob Larson <BLARSON at USC-ECLB.ARPA>


This discussion of sign extending pointers when converting to longs
has got me wondering what the Prime C compiler does when extending a
long into a pointer.  Pointers are the longest type on this compiler:
48 bits, while long, int, and unsigned are all 32 bits.  This breaks
all programs that assume pointers can be assigned to longs and recovered
unchanged.  Only char pointers need more than 32 bits,  but the compiler
author decided to make all pointers 48 bits anyway.  I'll investigate
this and report back if anyone is interested.  

-------



More information about the Comp.lang.c mailing list