Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.14
 
1.15
 
MAIN:ragge:20040619091427
 
local.c
_>142142                 if ((p->n_type & TMASK) == 0 && (l->n_type & TMASK) == 0 &&
 143143                     btdim[p->n_type] == btdim[l->n_type]) {
 144144                         if (p->n_type != FLOAT && p->n_type != DOUBLE &&
<>145 -                            l->n_type != FLOAT && l->n_type != DOUBLE) {
 146 -                                nfree(p);
 147 -                                return l;
  145+                            l->n_type != FLOAT && l->n_type != DOUBLE &&
  146+                            l->n_type != LDOUBLE && p->n_type != LDOUBLE) {
  147+                                if (l->n_op == NAME || l->n_op == UMUL) {
  148+                                        l->n_type = p->n_type;
  149+                                        nfree(p);
  150+                                        return l;
  151+                                }
148152                         }
 149153                 }
 150154 
     
 !
169173                         case UCHAR:
 170174                                 l->n_lval = val & 0377;
 171175                                 break;
<>172 -                        case USHORT:
  176+                        case SHORT:
173177                                 l->n_lval = (short)val;
 174178                                 break;
<>175 -                        case SHORT:
  179+                        case USHORT:
176180                                 l->n_lval = val & 0177777;
 177181                                 break;
<> 182+                        case ULONG:
178183                         case UNSIGNED:
 179184                                 l->n_lval = val & 0xffffffff;
 180185                                 break;
 181186                         case ENUMTY:
 182187                         case MOETY:
<> 188+                        case LONG:
183189                         case INT:
 184190                                 l->n_lval = (int)val;
 185191                                 break;
 186192                         case LONGLONG:
 187193                                 l->n_lval = (long long)val;
<> 194+                                break;
188195                         case ULONGLONG:
 189196                                 l->n_lval = val;
 190197                                 break;
     
 !
205212                 }
 206213                 break;
 207214 
<> 215+        case MOD:
  216+        case DIV:
  217+                if (o == DIV && p->n_type != CHAR && p->n_type != SHORT)
  218+                        break;
  219+                if (o == MOD && p->n_type != UCHAR)
  220+                        break;
  221+                /* make it an int division by inserting conversions */
  222+                p->n_left = block(SCONV, p->n_left, NIL, INT, 0, MKSUE(INT));
  223+                p->n_right = block(SCONV, p->n_right, NIL, INT, 0, MKSUE(INT));
  224+                p = block(SCONV, p, NIL, p->n_type, 0, MKSUE(p->n_type));
  225+                p->n_left->n_type = INT;
  226+                break;
  227+
208228         case PMCONV:
 209229         case PVCONV:
 210230                 if( p->n_right->n_op != ICON ) cerror( "bad conversion", 0);
     
 !
425445 /*
 426446  * map types which are not defined on the local machine
 427447  */
<>428 -int
  448+TWORD
<_429449 ctype(TWORD type)
 430450 {
 431451         switch (BTYPE(type)) {
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-22 00:15 +0100