2 ms·
> In C, for example, you cannot reference one object from a pointer to another object (there is one exception to this rule). I'm confused about what this means
by weberc2 10y ago
> In C, for example, you cannot reference one object from a pointer to another object (there is one exception to this rule).
I'm confused about what this means--can you explain?
- Arnavion 10y agoYou can't both cast a double* to an int* and then dereference the int* , expecting to read an int-sized chunk of the double. It's called strict aliasing and there are defined scenarios where it is allowed (one is that char* is an alias for all pointers).