3 ms·
The short version is that it's fine in C++ as long as you only read the member that was last written to or a char type.
by Chaosvex 5mo ago
The short version is that it's fine in C++ as long as you only read the member that was last written to or a char type.
- 1718627440 5mo agoAnd a slightly longer version is, that there are three types involved: the type of access, the effective type of the object[0], and the type of the variable. The type of the variable is only for the compiler to emit warnings, as long as the effective type and the type of access are equal, it isn't UB. [0] the C meaning of an object, not the C++ one