Thread overview
[Issue 5113] New: stray e2ir: in casting error message
Oct 24, 2010
Michael Parrott
Feb 16, 2012
yebblies
October 24, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5113

           Summary: stray e2ir: in casting error message
           Product: D
           Version: D1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P4
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: baseball.mjp@gmail.com


--- Comment #0 from Michael Parrott <baseball.mjp@gmail.com> 2010-10-24 15:19:54 PDT ---
void main()
{
    char c = cast(int)" ";
}

gives:

stringtocharcast.d(3): Error: e2ir: cannot cast " " of type char[1u] to type
int

Since that is the only error message I could find with e2ir: in front of it, I'll assume it's unintentional. The error message occurs on line 3901 of e2ir.c in the dmd 1.064 source.

default:
            if (fty == tty)
                goto Lpaint;
            //dump(0);
            //printf("fty = %d, tty = %d\n", fty, tty);
            error("e2ir: cannot cast %s of type %s to type %s", e1->toChars(),
e1->type->toChars(), t->toChars());
            goto Lzero;

Not sure if this is in D2 as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 16, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5113


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #1 from yebblies <yebblies@gmail.com> 2012-02-16 14:50:08 EST ---
*** Issue 7514 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 21, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5113



--- Comment #2 from bearophile_hugs@eml.cc 2012-04-20 17:53:19 PDT ---
Similar case:


int main() {
    float[1] a;
    return cast(int)a;
}


test2.d(3): Error: e2ir: cannot cast a of type float[1u] to type int

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