[Issue 3343] Crash by "auto main(){}"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 25 05:06:44 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3343


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2009-09-25 05:06:43 PDT ---
(In reply to comment #0)
> It is simple bug.
> 
> auto main(){}

It has a simple patch. func.c, line 567 (DMD 2.032):

        default:
        goto Lmainerr;
    }

+    if (!f->nextOf())
+        error("must return int or void");
+    else
    if (f->nextOf()->ty != Tint32 && f->nextOf()->ty != Tvoid)
        error("must return int or void, not %s", f->nextOf()->toChars());

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


More information about the Digitalmars-d-bugs mailing list