https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65892
--- Comment #15 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Melissa from comment #12) > A C++ conversion of the original example is below. I asked about the word > "read" on the C++ Standard Discussion (std-discussion) mailing list, because > it probably should also allow writing if it allows reads. Up to C++14 the wording said "inspect" which was changed to use "read" by http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1719 so I think limiting to reads and not writes is intended. (In reply to jos...@codesourcery.com from comment #14) > That C++ wording doesn't have any obvious bearing on what "it is > permitted" is intended to be an exception to - the general > implementation-defined nature of type punning (which I think was the > original intent in C90), or the aliasing rules. C++ doesn't support any type-punning, only reading from the common initial sequence (where the types must be compatible), so I think it can only be an exception to the aliasing rules.