Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.39
 
1.40
 
MAIN:ragge:20060616093031
 
local.c
_>4949         register struct symtab *q;
 5050         register NODE *r, *l;
 5151         register int o;
<>52 -        register int m, ml;
  52+        register int m;
5353         TWORD t;
 5454 
 5555 //printf("in:\n");
     
 !
128128                 break;
 129129 
 130130         case PCONV:
<>131 -                ml = p->n_left->n_type;
  131+                /* Remove redundant PCONV's. Be careful */
132132                 l = p->n_left;
<>133 -                if ((ml == CHAR || ml == UCHAR || ml == SHORT || ml == USHORT)
 134 -                    && l->n_op != ICON)
  133+                if (l->n_op == ICON) {
  134+                        l->n_lval = (unsigned)l->n_lval;
  135+                        goto delp;
  136+                }
  137+                if (l->n_type < INT || l->n_type == LONGLONG ||
  138+                    l->n_type == ULONGLONG) {
  139+                        /* float etc? */
  140+                        p->n_left = block(SCONV, l, NIL,
  141+                            UNSIGNED, 0, MKSUE(UNSIGNED));
135142                         break;
<>136 -                l->n_type = p->n_type;
  143+                }
  144+                /* if left is SCONV, cannot remove */
  145+                if (l->n_op == SCONV)
  146+                        break;
  147+                /* if conversion to another pointer type, just remove */
  148+                if (p->n_type > BTMASK && l->n_type > BTMASK)
  149+                        goto delp;
  150+                break;
  151+
  152+        delp:   l->n_type = p->n_type;
137153                 l->n_qual = p->n_qual;
 138154                 l->n_df = p->n_df;
 139155                 l->n_sue = p->n_sue;
 140156                 nfree(p);
 141157                 p = l;
 142158                 break;
<>143 -
  159+                
144160         case SCONV:
 145161                 l = p->n_left;
 146162 
     
 !
387403         if (t > BTMASK)
 388404                 t = INT; /* pointer */
 389405 
<> 406+        if (p->n_op != ICON)
  407+                cerror("ninval: init node not constant");
  408+
<_390409         switch (t) {
 391410         case LONGLONG:
 392411         case ULONGLONG:
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-26 10:21 +0100