3 ms·
> You are not allowed to use a pointer to one object to modify another. In this context, you means the author of a program written in Standard C. Implementatio
by serbuvlad 2y ago
> You are not allowed to use a pointer to one object to modify another.
In this context, you means the author of a program written in Standard C. Implementations can choose to allow this (and in practice all do, because of the nature of pointers). And obviously, a code transformer for a particular implementation of C would only need to generate code valid for that implementation of C, not valid Standard C code.
- uecker 2y agoTrue, an implementation could choose to allow this. But in is a bit questionable to say they do in practice, because most will miscompile your code in this case in various circumstances.