Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.59
 
1.60
 
MAIN:ragge:20030619142458
 
pftn.c
_>6969 
 7070 static NODE *arrstk[10];
 7171 static int arrstkp;
<> 72+static int intcompare;
7273 
 7374 void fixtype(NODE *p, int class);
 7475 int fixclass(int class, TWORD type);
     
 !
440441         tmpfree(); /* Release memory resources */
 441442         locctr(DATA);
 442443 }
<>443 -
  444+        
444445 void
 445446 dclargs()
 446447 {
     
 !
508509                                 (al2++)->df = parr[i]->sdf;
 509510                 }
 510511                 al2->type = TNULL;
<> 512+                intcompare = 1;
511513                 if (chkftn(al, alb))
 512514                         uerror("function doesn't match prototype");
<> 515+                intcompare = 0;
513516         }
 514517 done:   cendarg();
 515518         locctr(PROG);
     
 !
22822285 chkftn(union arglist *usym, union arglist *udef)
 22832286 {
 22842287         TWORD t2;
<>2285 -        int ty;
  2288+        int ty, tyn;
22862289 
 22872290         if (usym == NULL)
 22882291                 return 0;
     
 !
22912294         if (udef == NULL && usym->type != TNULL)
 22922295                 return 1;
 22932296         while (usym->type != TNULL) {
<>2294 -                if (usym->type != udef->type)
  2297+                if (usym->type == udef->type)
  2298+                        goto done;
  2299+                /*
  2300+                 * If an old-style declaration, then all types smaller than
  2301+                 * int are given as int parameters.
  2302+                 */
  2303+                if (intcompare) {
  2304+                        ty = BTYPE(usym->type);
  2305+                        tyn = BTYPE(udef->type);
  2306+                        if (ty == tyn || ty != INT)
  2307+                                return 1;
  2308+                        if (tyn == CHAR || tyn == UCHAR ||
  2309+                            tyn == SHORT || tyn == USHORT)
  2310+                                goto done;
22952311                         return 1;
<>2296 -                ty = BTYPE(usym->type);
  2312+                } else
  2313+                        return 1;
  2314+
  2315+done:           ty = BTYPE(usym->type);
<_22972316                 t2 = usym->type;
 22982317                 if (ISSTR(ty)) {
 22992318                         usym++, udef++;
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:51 +0100