comparison dmd/expression.c @ 328:7086a84ab3d6 trunk

[svn r349] Fixed problems with static arrays of void as well as a static arrays with zero length. Fixed issues with DMD generated assert statements when using class invariants, generally due to incomplete ASTs. Removed some dead code. Added a few comments.
author lindquist
date Fri, 11 Jul 2008 00:17:00 +0200
parents 2b72433d5c8c
children aaade6ded589
comparison
equal deleted inserted replaced
327:781af50846b2 328:7086a84ab3d6
7680 Expression *e; 7680 Expression *e;
7681 7681
7682 typeCombine(sc); // make sure pointer types are compatible 7682 typeCombine(sc); // make sure pointer types are compatible
7683 type = Type::tptrdiff_t; 7683 type = Type::tptrdiff_t;
7684 stride = t2->next->size(); 7684 stride = t2->next->size();
7685 if (!stride)
7686 return new IntegerExp(0, 0, Type::tptrdiff_t);
7685 e = new DivExp(loc, this, new IntegerExp(0, stride, Type::tptrdiff_t)); 7687 e = new DivExp(loc, this, new IntegerExp(0, stride, Type::tptrdiff_t));
7686 e->type = Type::tptrdiff_t; 7688 e->type = Type::tptrdiff_t;
7687 return e; 7689 return e;
7688 } 7690 }
7689 else if (t2->isintegral()) 7691 else if (t2->isintegral())