Bug 19182 – missing semicolon crashes compiler

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2018-08-20T12:41:33Z
Last change time
2018-09-06T18:46:18Z
Keywords
ice
Assigned to
No Owner
Creator
Simen Kjaeraas

Comments

Comment #0 by simen.kjaras — 2018-08-20T12:41:33Z
void foo() { pragma(msg, "") // Here static foreach (e; [1]) { pragma(msg, ""); } } Removing the surrounding function scope causes an error message: foo.d(1): Error: pragma `msg` is missing a terminating ; If the array is empty, it compiles without error (accepts-invalid). If there's no pragma(msg) inside the static foreach, it compiles without error. If I use (non-static) tuple foreach, it compiles without error.
Comment #1 by razvan.nitu1305 — 2018-08-22T15:50:38Z
Comment #2 by github-bugzilla — 2018-09-06T18:46:17Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/1b981b65641d44e8a8c81de798cc2e15e5116871 Fix Issue 19182 - missing semicolon crashes compiler https://github.com/dlang/dmd/commit/7bf8b689a6cdbe6ca4d82e97a970c4a4b370ef21 Merge pull request #8598 from RazvanN7/Issue_19182 Fix Issue 19182 - missing semicolon crashes compiler merged-on-behalf-of: Petar Kirov <[email protected]>