Bug 21797 – Stack overflow for forward-referenced enum min / max
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-04-04T20:53:43Z
Last change time
2021-04-04T22:55:37Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel
Comments
Comment #0 by moonlightsentinel — 2021-04-04T20:53:43Z
The following code crashes DMD with a stack overflow:
enum Foo
{
a,
b = Foo.min,
c
}
Comment #1 by dlang-bot — 2021-04-04T20:53:58Z
@MoonlightSentinel created dlang/dmd pull request #12371 "Fix 21797 - Stack overflow for forward-referenced enum min / max" fixing this issue:
- Fix 21797 - Stack overflow for forward-referenced enum min / max
Apply the fix for `.init` to `.min` / `.max`.
See 54805374b0043a38c50f1ea13412004901e5797d
https://github.com/dlang/dmd/pull/12371
Comment #2 by dlang-bot — 2021-04-04T22:55:37Z
dlang/dmd pull request #12371 "Fix 21797 - Stack overflow for forward-referenced enum min / max" was merged into master:
- 2ae90b863befa78b2479aedebc2db9941e67c231 by MoonlightSentinel:
Fix 21797 - Stack overflow for forward-referenced enum min / max
Apply the fix for `.init` to `.min` / `.max`.
See 54805374b0043a38c50f1ea13412004901e5797d
https://github.com/dlang/dmd/pull/12371