Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.112
 
1.113
 
MAIN:ragge:20040619091427
 
trees.c
_>677677                 if (t1 == VOID && t2 == VOID)
 678678                         return;
 679679                 if (t1 == VOID)
<>680 -                        return uerror("returning value from void function");
  680+                        return werror("returning value from void function");
681681                 if (t2 == VOID)
 682682                         return uerror("using void value");
 683683         case COLON:
     
 !
11091109         */
 11101110 
 11111111         TWORD t1, t2, t, tu;
<>1112 -        int o, u;
  1112+        int o, lu, ru;
11131113 
 11141114         o = p->n_op;
 11151115 
 11161116         t1 = p->n_left->n_type;
 11171117         t2 = p->n_right->n_type;
 11181118 
<>1119 -        u = 0;
  1119+        lu = ru = 0;
11201120         if( ISUNSIGNED(t1) ){
<>1121 -                u = 1;
  1121+                lu = 1;
11221122                 t1 = DEUNSIGN(t1);
 11231123                 }
 11241124         if( ISUNSIGNED(t2) ){
<>1125 -                u = 1;
  1125+                ru = 1;
11261126                 t2 = DEUNSIGN(t2);
 11271127                 }
 11281128 
     
 !
11581158                 tu = p->n_left->n_type;
 11591159                 t = t1;
 11601160         } else {
<>1161 -                tu = (u && UNSIGNABLE(t))?ENUNSIGN(t):t;
  1161+                tu = ((ru|lu) && UNSIGNABLE(t))?ENUNSIGN(t):t;
11621162         }
 11631163 
 11641164         /* because expressions have values that are at least as wide
     
 !
11671167            from LONG to INT and ULONG to UNSIGNED */
 11681168 
 11691169 
<>1170 -        if (t != t1)
  1170+        if (t != t1 || (ru && !lu))
11711171                 p->n_left = makety( p->n_left, tu, 0, 0, MKSUE(tu));
 11721172 
<>1173 -        if (t != t2 || o==CAST)
  1173+        if (t != t2 || o==CAST || (lu && !ru))
<_11741174                 p->n_right = makety(p->n_right, tu, 0, 0, MKSUE(tu));
 11751175 
 11761176         if( casgop(o) ){
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-11-01 10:47 +0100