I'm porting my code over to 64-bit and get the "casting to pointer from integer of different size" warning from:I can understand it warning about a loss of information (casting down), but casting up isn't dangerous and the compiler should no more complain than had I done (long long)(int). Anyways I suppose that's compiler philosophy. What I need to know is how do I shut it up without resorting to #ifdef's?
This does not work:
only other alternative I can think of is -Wno-int-to-pointer-cast
(void *) (sizeof(void *) == sizeof(long long) ? (long long)foo : foo)