pointer to void property



Given the following:

int a = 10;

int *p;
void *p1;
unsigned char *p2;

p = &a;

p1 = p;

p2 = p1;

is a guarantee made that I can access the object representation
via 'p2'?

Will the value assigned between different pointer to object types
through use of a generic pointer preserve this value?

I know it is guaranteed to be preserved if it is assigned from a
pointer to an object type to a void pointer and back again to said
pointer to object type. But will the value assigned between different
pointer to object types through use of a generic pointer, preserve this
value?


--
aegis

.



Relevant Pages