3 ms·
That is not correct. The type used to write to the memory is int, not void or char. If the object, whose address is passed to the function is not compatible wit
by vrfcodf 10y ago
That is not correct. The type used to write to the memory is int, not void or char. If the object, whose address is passed to the function is not compatible with int, the behavior is undefined.
You should read about strict aliasing, you will be surprised.
- PeCaN 10y agoYou're right, I misread and misinterpreted that! Thanks. Somehow I wasn't thinking and didn't realize that `t` aliases whatever was passed as `p`, and dereferencing a non int or char pointer would be undefined there.