Bug 7209 – Stack overflow on explicitly typed enum circular dependency

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-03T01:12:00Z
Last change time
2014-05-28T20:29:20Z
Assigned to
nobody
Creator
timon.gehr

Comments

Comment #0 by timon.gehr — 2012-01-03T01:12:11Z
The following code causes a stack overflow in DMD 2.057: enum int a=b,b=a;
Comment #1 by timon.gehr — 2012-01-03T13:26:27Z
Shorter instance: enum int a=a;
Comment #2 by timon.gehr — 2012-10-31T09:16:48Z
*** Issue 8610 has been marked as a duplicate of this issue. ***
Comment #3 by github-bugzilla — 2014-05-28T20:29:20Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c34acdacd7d37eb7b0f029d3b4bbe53823e4a55c Fix bug 7209: Stack overflow on circular enum with explicit type Detect the error in the semantic pass. This slightly changes the error message for one existing test (it was previously detected inside CTFE) -- now the *first* circular definition generates the error, which makes more sense. https://github.com/D-Programming-Language/dmd/commit/4fbe9f4ed0cd1784a1cc51dff65f4608ea2078b1 Merge pull request #3594 from donc/circular_enum7209 Fix bug 7209: Stack overflow on circular enum with explicit type