Re: [Linux-ia64] integer -> pointer question

Jes Sorensen
2000-08-01T00:49:20Z

>>>>> "Michael" = Michael Madore <mmadore@turbolinux.com> writes:

>> Hi Michael
>>
>> Storing integers in void pointers without a cast is simply broken
>> and nobody should do that or to be more precise you cannot expect
>> void * to be the same size as int.
>>
>> Basically the correct solution is to LART the programmer of the bad
>> code.
>>
>> Jes

Michael> The code does perform the cast, but since the upper four
Michael> bytes of the pointer will be meaningless, it's spits out a
Michael> warning.

Good point, what they really should be doing is to use long instead of
void * then - you know that long = sizeof(void *) but you shouldn't
get the error for that.

Jes