[Issue 1470] New: "extern (C)" inside function crashes gdc

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 2 14:30:08 PDT 2007


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

           Summary: "extern (C)" inside function crashes gdc
           Product: D
           Version: 2.004
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: u.singer at gmx.net


Hi,

I am using the  D compiler on Mac OS X 10.4 ("gdc-0.24-mac-10.4.dmg" from
sourceforge.net).
The following code crashes my gdc:

long atol (string str)
{
    extern (C) long atoll(char *nptr);
    return atoll(cast(char *)(str));
}

When running gdc, it says:

crash.d: In function ‘atol’:
crash.d:5: internal compiler error: Bus error
Please submit a full bug report ...

If I put the "extern (C)" declaration out of the function, the bus error goes
away.


-- 



More information about the Digitalmars-d-bugs mailing list