[Issue 4082] nothrow main() can throw

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 15 14:14:20 PDT 2010


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


Byron Heads <bheads at emich.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bheads at emich.edu


--- Comment #1 from Byron Heads <bheads at emich.edu> 2010-06-15 14:14:19 PDT ---
Same for dmd 2.047

It seems to be a problem with the goto.

The compile errors on this code:

struct foo {
        ~this() { throw new Exception( "BAD!" ); }
}

void bar() {}

nothrow void main()
{
        foo f;
        bar();
        goto STOP;
        STOP:;
}


Error: function D main 'main' is nothrow yet may throw

-- 
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