Bug 11552 – Missing label is not caught during semantic

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-19T03:18:00Z
Last change time
2013-11-19T23:42:57Z
Keywords
accepts-invalid, CTFE, ice, pull
Assigned to
yebblies
Creator
yebblies

Comments

Comment #0 by yebblies — 2013-11-19T03:18:29Z
This compiles with no errors with -o- void main() { goto label; } And this ices: int test() { goto label; return 1; } static assert(test());
Comment #1 by yebblies — 2013-11-19T04:06:35Z
Comment #2 by bearophile_hugs — 2013-11-19T04:46:52Z
(In reply to comment #1) > https://github.com/D-Programming-Language/dmd/pull/2825 Related to labels there are also Issue 6449 and Issue 4902 .
Comment #3 by yebblies — 2013-11-19T05:09:15Z
(In reply to comment #2) > (In reply to comment #1) > > https://github.com/D-Programming-Language/dmd/pull/2825 > > Related to labels there are also Issue 6449 and Issue 4902 . When I'm done with the compiler D port, we should take all of these warning enhancements that are never going to make it into the compiler, and make dlint. You can come up with the test cases, and I'll do the compiler stuff. Sound good?
Comment #4 by bearophile_hugs — 2013-11-19T07:15:04Z
(In reply to comment #3) > When I'm done with the compiler D port, we should take all of these warning > enhancements that are never going to make it into the compiler, and make dlint. > You can come up with the test cases, and I'll do the compiler stuff. Sound > good? Sounds good :)
Comment #5 by github-bugzilla — 2013-11-19T23:42:25Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/115311541146ad57449a5e6ff8ecceffa670a0cb Fix Issue 11552 - Missing label is not caught during semantic https://github.com/D-Programming-Language/dmd/commit/25552cf6dfcc5aaa530fd0e786864f952815449e Merge pull request #2825 from yebblies/issue11552 Issue 11552 - Missing label is not caught during semantic