Bug 13031 – `continue` with label causes compiler to think code after loop can be executed

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-03T11:20:16Z
Last change time
2024-12-13T18:21:53Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Denis Shelomovskii
Moved to GitHub: dmd#18845 →

Comments

Comment #0 by verylonglogin.reg — 2014-07-03T11:20:16Z
This code should compile: --- int f(int a) { L: for(;;) { if(a--) continue L; return 0; } } --- main.d(1): Error: function main.f no return exp; or assert(0); at end of function ---
Comment #1 by robert.schadek — 2024-12-13T18:21:53Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18845 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB