comparison dmd2/constfold.c @ 1526:54b3c1394d62

Merged dmdfe 2.031.
author Robert Clipsham <robert@octarineparrot.com>
date Tue, 07 Jul 2009 02:26:11 +0100
parents 638d16625da2
children e4f7b5d9c68a
comparison
equal deleted inserted replaced
1525:d28cd7c45267 1526:54b3c1394d62
851 Expression *Identity(enum TOK op, Type *type, Expression *e1, Expression *e2) 851 Expression *Identity(enum TOK op, Type *type, Expression *e1, Expression *e2)
852 { Expression *e; 852 { Expression *e;
853 Loc loc = e1->loc; 853 Loc loc = e1->loc;
854 int cmp; 854 int cmp;
855 855
856 if (e1->op == TOKnull && e2->op == TOKnull) 856 if (e1->op == TOKnull)
857 { 857 {
858 cmp = 1; 858 cmp = (e2->op == TOKnull);
859 }
860 else if (e2->op == TOKnull)
861 {
862 cmp = 0;
859 } 863 }
860 else if (e1->op == TOKsymoff && e2->op == TOKsymoff) 864 else if (e1->op == TOKsymoff && e2->op == TOKsymoff)
861 { 865 {
862 SymOffExp *es1 = (SymOffExp *)e1; 866 SymOffExp *es1 = (SymOffExp *)e1;
863 SymOffExp *es2 = (SymOffExp *)e2; 867 SymOffExp *es2 = (SymOffExp *)e2;