On Thu, Jul 2, 2009 at 3:29 PM, Andrew Stubbs<[email protected]> wrote: > On 02/07/09 14:26, Richard Guenther wrote: >> >> You are writing to memory of type void * via an lvalue of type short *. > > Yes, there is type punning there, but that should work, shouldn't it?
No, that's invalid. You would have to do
extern union {
void *foo;
short *bar;
};
using the union for the double-indirect pointer doesn't help. Or
simply use memcpy to store to foo.
Richard.
