Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.232
 
1.233
 
MAIN:ragge:20090329163505
 
trees.c
_>16781678 NODE *
 16791679 doszof(NODE *p)
 16801680 {
<> 1681+        extern NODE *arrstk[10];
  1682+        extern int arrstkp;
16811683         union dimfun *df;
 16821684         TWORD ty;
<>1683 -        NODE *rv;
  1685+        NODE *rv, *q;
  1686+        int astkp;
16841687 
 16851688         if (p->n_op == FLD)
 16861689                 uerror("can't apply sizeof to bit-field");
     
 !
16921695         rv = bcon(1);
 16931696         df = p->n_df;
 16941697         ty = p->n_type;
<> 1698+        astkp = 0;
16951699         while (ISARY(ty)) {
 16961700                 if (df->ddim == NOOFFSET)
 16971701                         uerror("sizeof of incomplete type");
<>1698 -                rv = buildtree(MUL, rv, df->ddim >= 0 ? bcon(df->ddim) :
 1699 -                    tempnode(-df->ddim, INT, 0, MKSUE(INT)));
  1702+                if (df->ddim < 0) {
  1703+                        if (arrstkp)
  1704+                                q = arrstk[astkp++];
  1705+                        else
  1706+                                q = tempnode(-df->ddim, INT, 0, MKSUE(INT));
  1707+                } else
  1708+                        q = bcon(df->ddim);
  1709+                rv = buildtree(MUL, rv, q);
17001710                 df++;
 17011711                 ty = DECREF(ty);
 17021712         }
 17031713         rv = buildtree(MUL, rv, bcon(tsize(ty, p->n_df, p->n_sue)/SZCHAR));
 17041714         tfree(p);
<> 1715+        arrstkp = 0; /* XXX - may this fail? */
<_17051716         return rv;
 17061717 }
 17071718 
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-07-11 05:27 +0200