https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119027
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Keywords| |accepts-invalid
Last reconfirmed| |2025-02-26
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Clang says:
<source>:3:2: error: cannot jump from switch statement to this case label
3 | case 42:;
| ^
<source>:2:13: note: jump enters controlled statement of constexpr if
2 | switch (i) if constexpr (false) {
| ^
1 error generated.
EDG says:
"jump.cc", line 2: warning: statement is unreachable
switch (i) if constexpr (false) {
^
"jump.cc", line 2: error: transfer of control into a constexpr if block is not
allowed
switch (i) if constexpr (false) {
^
1 error detected in the compilation of "jump.cc".