[BACK]Return to tree.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / xlint / lint1

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/xlint/lint1/tree.c between version 1.12 and 1.13

version 1.12, 1995/10/02 17:37:57 version 1.13, 1997/03/12 18:28:58
Line 2660  plength(tp)
Line 2660  plength(tp)
         return (getinode(st, (quad_t)(elem * elsz / CHAR_BIT)));          return (getinode(st, (quad_t)(elem * elsz / CHAR_BIT)));
 }  }
   
 #ifdef XXX_BROKEN_GCC  
 static int  
 quad_t_eq(x, y)  
         quad_t x, y;  
 {  
         return (x == y);  
 }  
   
 static int  
 u_quad_t_eq(x, y)  
         u_quad_t x, y;  
 {  
         return (x == y);  
 }  
 #endif  
   
 /*  /*
  * Do only as much as necessary to compute constant expressions.   * Do only as much as necessary to compute constant expressions.
  * Called only if the operator allows folding and (both) operands   * Called only if the operator allows folding and (both) operands
Line 2781  fold(tn)
Line 2765  fold(tn)
                 q = utyp ? ul > ur : sl > sr;                  q = utyp ? ul > ur : sl > sr;
                 break;                  break;
         case EQ:          case EQ:
 #ifdef XXX_BROKEN_GCC  
                 q = utyp ? u_quad_t_eq(ul, ur) : quad_t_eq(sl, sr);  
 #else  
                 q = utyp ? ul == ur : sl == sr;                  q = utyp ? ul == ur : sl == sr;
 #endif  
                 break;                  break;
         case NE:          case NE:
                 q = utyp ? ul != ur : sl != sr;                  q = utyp ? ul != ur : sl != sr;
Line 2819  fold(tn)
Line 2799  fold(tn)
         return (cn);          return (cn);
 }  }
   
 #ifdef XXX_BROKEN_GCC  
 int  
 ldbl_t_neq(x, y)  
         ldbl_t x, y;  
 {  
         return (x != y);  
 }  
 #endif  
   
 /*  /*
  * Same for operators whose operands are compared with 0 (test context).   * Same for operators whose operands are compared with 0 (test context).
  */   */
Line 2844  foldtst(tn)
Line 2815  foldtst(tn)
                 lerror("foldtst() 1");                  lerror("foldtst() 1");
   
         if (isftyp(tn->tn_left->tn_type->t_tspec)) {          if (isftyp(tn->tn_left->tn_type->t_tspec)) {
 #ifdef XXX_BROKEN_GCC  
                 l = ldbl_t_neq(tn->tn_left->tn_val->v_ldbl, 0.0);  
 #else  
                 l = tn->tn_left->tn_val->v_ldbl != 0.0;                  l = tn->tn_left->tn_val->v_ldbl != 0.0;
 #endif  
         } else {          } else {
                 l = tn->tn_left->tn_val->v_quad != 0;                  l = tn->tn_left->tn_val->v_quad != 0;
         }          }
   
         if (modtab[tn->tn_op].m_binary) {          if (modtab[tn->tn_op].m_binary) {
                 if (isftyp(tn->tn_right->tn_type->t_tspec)) {                  if (isftyp(tn->tn_right->tn_type->t_tspec)) {
 #ifdef XXX_BROKEN_GCC  
                         r = ldbl_t_neq(tn->tn_right->tn_val->v_ldbl, 0.0);  
 #else  
                         r = tn->tn_right->tn_val->v_ldbl != 0.0;                          r = tn->tn_right->tn_val->v_ldbl != 0.0;
 #endif  
                 } else {                  } else {
                         r = tn->tn_right->tn_val->v_quad != 0;                          r = tn->tn_right->tn_val->v_quad != 0;
                 }                  }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

CVSweb <webmaster@jp.NetBSD.org>