sizeof problems

L.Marshall lfm at ukc.UUCP
Mon May 21 16:58:13 AEST 1984


There was another interesting sizeof problem with the V7 PDP11 compiler
(I dont know if it affected any others) whereby combinations of negation
and coercion applied to "sizeof" fell over. I cant remember the exact 
error but it was something like either 

    - (long) sizeof(int)
         or
    (long) - sizeof(int)

The result was not properly sign extended from 16 to 32 bits.
I can dig out the exact details if anyone is interested.

  Lindsay F. Marshall
    uucp : ...<UK>!ukc!lfm
    ARPA : Lindsay_Marshall%NEWCASTLE at MIT-MULTICS
    post : Computing Laboratory, U of Newcastle upon Tyne, U.K.
           +44 - 632 - 329233 xtn 212



More information about the Comp.lang.c mailing list