Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.45
 
1.46
 
MAIN:ragge:20030707111417
 
trees.c
_>529529 {
 530530         int i, u;
 531531         CONSZ val;
<>532 -        TWORD utype;    /* XXX 4.4 */
533532 
 534533         val = q->n_lval;
 535534         u = ISUNSIGNED(p->n_type) || ISUNSIGNED(q->n_type);
     
 !
542541         if (p->n_sp != NULL && o != PLUS && o != MINUS)
 543542                 return(0);
 544543 
<>545 -                /* XXX 4.4 följande stycke */
 546 -        /* usual type conversions -- handle casts of constants */
 547 -#define ISLONG(t)       ((t) == LONG || (t) == ULONG)
 548 -#define ISLONGLONG(t)   ((t) == LONGLONG || (t) == ULONGLONG)
 549 -        if (ISLONG(p->n_type) || ISLONG(q->n_type))
 550 -                utype = u ? ULONG : LONG;
 551 -        else if (ISLONGLONG(p->n_type) || ISLONGLONG(q->n_type))
 552 -                utype = u ? ULONGLONG : LONGLONG;
 553 -        else
 554 -                utype = u ? UNSIGNED : INT;
 555 -        if( !ISPTR(p->n_type) && p->n_type != utype )
 556 -                p = makety(p, utype, 0, MKSUE(utype));
 557 -        if( q->n_type != utype )
 558 -                q = makety(q, utype, 0, MKSUE(utype));
 559 -
560544         switch( o ){
 561545 
 562546         case PLUS:
     
 !
573557                 p->n_lval *= val;
 574558                 break;
 575559         case DIV:
<>576 -                if( val == 0 ) uerror( "division by 0" );
 577 -                else if ( u ) p->n_lval = (unsigned) p->n_lval / val;   /* XXX 4.4 */
 578 -                else p->n_lval /= val;
  560+                if (val == 0)
  561+                        uerror("division by 0");
  562+                else
  563+                        p->n_lval /= val;
579564                 break;
 580565         case MOD:
<>581 -                if( val == 0 ) uerror( "division by 0" );
 582 -                else if ( u ) p->n_lval = (unsigned) p->n_lval % val;   /* XXX 4.4 */
 583 -                else p->n_lval %= val;
  566+                if (val == 0)
  567+                        uerror("division by 0");
  568+                else
  569+                        p->n_lval %= val;
584570                 break;
 585571         case AND:
 586572                 p->n_lval &= val;
     
 !
597583                 break;
 598584         case RS:
 599585                 i = val;
<>600 -                if ( u ) p->n_lval = (unsigned) p->n_lval >> i/* XXX 4.4 */
 601 -                else p->n_lval = p->n_lval >> i;
  586+                p->n_lval = p->n_lval >> i;
602587                 break;
 603588 
 604589         case UNARY MINUS:
     
 !
623608                 p->n_lval = p->n_lval >= val;
 624609                 break;
 625610         case ULT:
<>626 -                p->n_lval = p->n_lval < (unsigned) val;
  611+                p->n_lval = (p->n_lval-val)<0;
627612                 break;
 628613         case ULE:
<>629 -                p->n_lval = p->n_lval <= (unsigned) val;
  614+                p->n_lval = (p->n_lval-val)<=0;
630615                 break;
 631616         case UGT:
<>632 -                p->n_lval = p->n_lval > (unsigned) val;
  617+                p->n_lval = (p->n_lval-val)>=0;
633618                 break;
 634619         case UGE:
<>635 -                p->n_lval = p->n_lval >= (unsigned) val;
  620+                p->n_lval = (p->n_lval-val)>0;
636621                 break;
 637622         case EQ:
 638623                 p->n_lval = p->n_lval == val;
     
 !
879864         return(p);
 880865 }
 881866 
<>882 -#ifndef econvert        /* XXX 4.4 */
883867 void
 884868 econvert( p ) register NODE *p; {
 885869 
     
 !
905889                         p->n_type = INT, p->n_sue = MKSUE(INT);
 906890         }
 907891 }
<>908 -#endif
<_909892 
 910893 NODE *
 911894 pconvert( p ) register NODE *p; {
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-30 19:53 +0200