Bug 3343 – Crash by "auto main(){}"

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2009-09-25T04:58:00Z
Last change time
2015-06-09T01:26:49Z
Keywords
ice-on-invalid-code, patch
Assigned to
nobody
Creator
rayerd.wiz

Comments

Comment #0 by rayerd.wiz — 2009-09-25T04:58:18Z
It is simple bug. auto main(){}
Comment #1 by clugdbug — 2009-09-25T05:06:43Z
(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());
Comment #2 by bugzilla — 2009-10-13T13:48:09Z
Fixed dmd 1.049 and 2.034