Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.6
 
1.7
 
MAIN:ragge:20020510200453
 
pftn.c
_>14881488         if( commflag ) commdec( p->tn.rval );
 14891489 }
 14901490 
<> 1491+/*
  1492+ * Return a basic type from basic types t1, t2, t3 and t4.
  1493+ */
14911494 TWORD
<>1492 -types( t1, t2, t3 ) TWORD t1, t2, t3; {
 1493 -        /* return a basic type from basic types t1, t2, and t3 */
  1495+types(TWORD t1, TWORD t2, TWORD t3, TWORD t4) {
14941496 
<>1495 -        TWORD t[3], noun, adj, unsg;
  1497+        TWORD t[4], noun, adj, unsg;
14961498         int i;
 14971499 
 14981500         t[0] = t1;
 14991501         t[1] = t2;
 15001502         t[2] = t3;
<> 1503+        t[3] = t4;
15011504 
 15021505         unsg = INT/* INT or UNSIGNED */
 15031506         noun = UNDEF/* INT, CHAR, or FLOAT */
     
 !
15141517                 case UNDEF:
 15151518                         continue;
 15161519 
<> 1520+                case SIGNED:
15171521                 case UNSIGNED:
<>1518 -                        if( unsg != INT ) goto bad;
 1519 -                        unsg = UNSIGNED;
  1522+                        if (unsg != INT)
  1523+                                goto bad;
  1524+                        unsg = t[i];
15201525                         continue;
 15211526 
 15221527                 case LONG:
<> 1528+                        if (adj == LONG) {
  1529+                                adj = LONGLONG;
  1530+                                continue;
  1531+                        }
15231532                 case SHORT:
<>1524 -                        if( adj != INT ) goto bad;
  1533+                        if (adj != INT)
  1534+                                goto bad;
15251535                         adj = t[i];
 15261536                         continue;
 15271537 
 15281538                 case INT:
 15291539                 case CHAR:
 15301540                 case FLOAT:
<>1531 -                        if( noun != UNDEF ) goto bad;
  1541+                        if (noun != UNDEF)
  1542+                                goto bad;
15321543                         noun = t[i];
 15331544                         continue;
 15341545                         }
 15351546                 }
 15361547 
 15371548         /* now, construct final type */
<>1538 -        if( noun == UNDEF ) noun = INT;
 1539 -        else if( noun == FLOAT ){
 1540 -                if( unsg != INT || adj == SHORT ) goto bad;
 1541 -                return( adj==LONG ? DOUBLE : FLOAT );
 1542 -                }
 1543 -        else if( noun == CHAR && adj != INT ) goto bad;
  1549+        if (noun == UNDEF)
  1550+                noun = INT;
  1551+        else if (noun == FLOAT) {
  1552+                if (unsg != INT || adj == SHORT)
  1553+                        goto bad;
  1554+                return (adj==LONG ? DOUBLE : FLOAT);
  1555+        } else if (noun == CHAR && adj != INT)
  1556+                goto bad;
15441557 
 15451558         /* now, noun is INT or CHAR */
<>1546 -        if( adj != INT ) noun = adj;
 1547 -        if( unsg == UNSIGNED ) return( noun + (UNSIGNED-INT) );
 1548 -        else return( noun );
 1549 -        }
  1559+        if (adj != INT)
  1560+                noun = adj;
  1561+        if (unsg == UNSIGNED)
  1562+                return noun == LONGLONG ? ULONGLONG : (noun + (UNSIGNED-INT));
  1563+        else
  1564+                return (noun);
  1565+}
<_15501566 
 15511567 NODE *
 15521568 tymerge( typ, idp ) NODE *typ, *idp; {
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-22 14:15 +0200