[Issue 14596] New: Error: e2ir: cannot cast malloc(42u) of type void* to type char[]

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun May 17 03:41:21 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14596

          Issue ID: 14596
           Summary: Error: e2ir: cannot cast malloc(42u) of type void* to
                    type char[]
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: rswhite4 at gmail.com

I believe the error is an ICE and should be fixed, or, at least, the internal
filename should not be shown.

dmd 2.067.1

Code:
----
void main() {
    import core.stdc.stdlib : malloc;
    auto ptr = cast(char[]) malloc(42);
}
----

--


More information about the Digitalmars-d-bugs mailing list