Bug 24356 – goto case label not correctly generated by CTFE

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2024-01-25T21:51:39Z
Last change time
2024-12-13T19:32:49Z
Assigned to
No Owner
Creator
Carl Sturtivant
Moved to GitHub: dmd#20389 →

Attachments

IDFilenameSummaryContent-TypeSize
1903goto_case_bug.dGoto case CTFE compilation errortext/plain422
1904goto_case_nobug.dWork around for goto case CTFE bugtext/plain453

Comments

Comment #0 by sturtivant — 2024-01-25T21:51:39Z
Created attachment 1903 Goto case CTFE compilation error If the label in a `goto case` is written using CTFE then the compiler claims the label does not exist. If the CTFE call to make the label is instead used to define an enum, and the enum used as the label, everything now works as expected.
Comment #1 by sturtivant — 2024-01-25T21:53:25Z
Created attachment 1904 Work around for goto case CTFE bug Shows that goto case does work with the computed label.
Comment #2 by robert.schadek — 2024-12-13T19:32:49Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20389 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB