]>
git.ipfire.org Git - thirdparty/gcc.git/commit
doc: type-punning through a union is a GNU extension for C++
We didn't explicitly say that type-punning through a union is undefined
behavior in C++. Mention that, and that we support it as a GNU extension.
This was reported on LLVM's Discourse (forums) [0].
[0] https://discourse.llvm.org/t/ub-when-type-punning-through-unions/88527/6
gcc/ChangeLog:
PR c++/117219
* doc/invoke.texi (-fstrict-aliasing): Explain that type-punning
through a union in C++ is supported as a GNU extension.