https://bugs.llvm.org/show_bug.cgi?id=43921
David Blaikie <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
CC| |[email protected]
--- Comment #1 from David Blaikie <[email protected]> ---
8.20 [expr.const] p2
"An expression e is a core constant expression unless the evaluation of e,
following the rules of the abstract machine (4.6), would evaluate one of the
following expressions:
...
* an lvalue-to-rvalue conversion (7.1) that is applied to a glvalue that refers
to a non-active member of a union or a subobject thereof;"
It's not undefined behavior, but it isn't allowed in a constant expression.
(the wording of the error message hints at this by saying "is not allowed in a
constant expression"
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs