www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8511] New: Segfault with forward-referenced enum

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8511

           Summary: Segfault with forward-referenced enum
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com



23:49:24 PDT ---
--- 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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 04 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8511


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |WORKSFORME



17:59:03 PDT ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 03 2013