https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117219

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sam James <[email protected]>:

https://gcc.gnu.org/g:b52a90e7a03fef3c237a78c91dcad37237338d1b

commit r16-4313-gb52a90e7a03fef3c237a78c91dcad37237338d1b
Author: Sam James <[email protected]>
Date:   Thu Oct 9 03:40:58 2025 +0100

    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.

Reply via email to