Changeset 206

Show
Ignore:
Timestamp:
10/13/09 16:08:57 (2 years ago)
Author:
walter
Message:

bugzilla 3392

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dmd-1.x/src/e2ir.c

    r202 r206  
    32053205 
    32063206elem *CastExp::toElem(IRState *irs) 
    3207 {   elem *e; 
     3207{ 
    32083208    TY fty; 
    32093209    TY tty; 
     
    32113211    tym_t ttym; 
    32123212    enum OPER eop; 
    3213     Type *t; 
    3214     Type *tfrom; 
    32153213 
    32163214#if 0 
     
    32213219#endif 
    32223220 
    3223     e = e1->toElem(irs); 
    3224     tfrom = e1->type->toBasetype(); 
    3225     t = to->toBasetype();     // skip over typedef's 
     3221    elem *e = e1->toElem(irs); 
     3222    Type *tfrom = e1->type->toBasetype(); 
     3223    Type *t = to->toBasetype();       // skip over typedef's 
    32263224    if (t->equals(tfrom)) 
    32273225    goto Lret; 
     
    33593357    } 
    33603358 
    3361     ftym = e->Ety
    3362     ttym = t->totym(); 
     3359    ftym = tybasic(e->Ety)
     3360    ttym = tybasic(t->totym()); 
    33633361    if (ftym == ttym) 
    33643362    goto Lret; 
     
    38643862        //dump(0); 
    38653863        //printf("fty = %d, tty = %d\n", fty, tty); 
    3866         error("e2ir: cannot cast from %s to %s", e1->type->toChars(), t->toChars()); 
     3864        error("e2ir: cannot cast %s of type %s to type %s", e1->toChars(), e1->type->toChars(), t->toChars()); 
    38673865        goto Lzero; 
    38683866 
  • trunk/src/e2ir.c

    r202 r206  
    28202820    } 
    28212821#endif 
    2822 //printf("test2 %d\n", op); 
    28232822//if (op == TOKconstruct) printf("construct\n"); 
    28242823    if (t1b->ty == Tstruct) 
     
    35333532 
    35343533elem *CastExp::toElem(IRState *irs) 
    3535 {   elem *e; 
     3534{ 
    35363535    TY fty; 
    35373536    TY tty; 
     
    35393538    tym_t ttym; 
    35403539    enum OPER eop; 
    3541     Type *t; 
    3542     Type *tfrom; 
    35433540 
    35443541#if 0 
     
    35493546#endif 
    35503547 
    3551     e = e1->toElem(irs); 
    3552     tfrom = e1->type->toBasetype(); 
    3553     t = to->toBasetype();     // skip over typedef's 
     3548    elem *e = e1->toElem(irs); 
     3549    Type *tfrom = e1->type->toBasetype(); 
     3550    Type *t = to->toBasetype();       // skip over typedef's 
    35543551    if (t->equals(tfrom)) 
    35553552    goto Lret; 
     
    36953692    } 
    36963693 
    3697     ftym = e->Ety
    3698     ttym = t->totym(); 
     3694    ftym = tybasic(e->Ety)
     3695    ttym = tybasic(t->totym()); 
    36993696    if (ftym == ttym) 
    37003697    goto Lret; 
     
    41994196        goto Lpaint; 
    42004197        //dump(0); 
    4201         //printf("fty = %d, tty = %d\n", fty, tty); 
    4202         error("e2ir: cannot cast from %s to %s", e1->type->toChars(), t->toChars()); 
     4198        //printf("fty = %d, tty = %d, %d\n", fty, tty, t->ty); 
     4199        error("e2ir: cannot cast %s of type %s to type %s", e1->toChars(), e1->type->toChars(), t->toChars()); 
    42034200        goto Lzero; 
    42044201