Bug 8511 – Segfault with forward-referenced enum

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-08-04T23:49:00Z
Last change time
2013-11-16T02:05:25Z
Keywords
ice
Assigned to
nobody
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2012-08-04T23:49:24Z
--- math.d --- real hypot() { enum SQRTMAX; SQRTMAX/2; } --- output --- $ dmd math.d math.d(2): Error: enum SQRTMAX is forward referenced math.d(2): Error: enum SQRTMAX is forward referenced math.d(2): Error: enum SQRTMAX is forward referenced math.d(2): Error: enum SQRTMAX is forward referenced math.d(2): Error: enum SQRTMAX is forward referenced math.d(2): Error: enum SQRTMAX is forward referenced Segmentation fault
Comment #1 by bugzilla — 2013-10-03T17:59:03Z
With 2.064 head, produces: test.d(3): Error: type SQRTMAX has no value test.d(3): Error: / has no effect in expression ((SQRTMAX) / 2) test.d(1): Error: function test.hypot has no return statement, but is expected to return a value of type real
Comment #2 by github-bugzilla — 2013-11-16T00:59:33Z