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

Jiang An <de34 at live dot cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |de34 at live dot cn

--- Comment #4 from Jiang An <de34 at live dot cn> ---
(In reply to Andrew Pinski from comment #1)
> I would have expected this to be undefined ...
> So the static_assert could work or not.

If this were undefined (not true IIUC), static_assert would be required not to
work because the condition expression is not a constant expression
([expr.const]/5.8).

We should keep in mind that all kinds of core UB that may occur within
(tentative) constant evaluation (except for violation of [[assume]], currently)
are not totally undefined, since they must cause constant evaluation failure.
CWG issue should be submitted if such detection is unimplementable.

Reply via email to