Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.217
 
1.218
 
MAIN:ragge:20081128163606
 
trees.c
_>7878 static NODE *strargs(NODE *);
 7979 static void rmcops(NODE *p);
 8080 static void putjops(NODE *, void *);
<> 81+static struct symtab *findmember(struct symtab *, char *);
8182 int inftn; /* currently between epilog/prolog */
 8283 
 8384 /*      some special actions, used in finding the type of nodes */
     
 !
119120         int opty;
 120121         struct symtab *sp = NULL; /* XXX gcc */
 121122         NODE *lr, *ll;
<>122 -        char *name;
123123 
 124124 #ifdef PCC_DEBUG
 125125         if (bdebug) {
     
 !
322322                                 break;
 323323                         }
 324324 
<> 325+                        sp = findmember(sp, r->n_name);
  326+#ifdef notdef
325327                         name = r->n_name;
 326328                         for (; sp != NULL; sp = sp->snext) {
 327329                                 if (sp->sname == name)
 328330                                         break;
 329331                         }
<> 332+#endif
330333                         if (sp == NULL) {
<>331 -                                uerror("member '%s' not declared", name);
  334+                                uerror("member '%s' not declared", r->n_name);
332335                                 break;
 333336                         }
 334337 
     
 !
509512 
 510513         }
 511514 
<> 515+/* Find a member in a struct or union.  May be an unnamed member */
  516+static struct symtab *
  517+findmember(struct symtab *sp, char *s)
  518+{
  519+        struct symtab *sp2, *sp3;
  520+
  521+        for (; sp != NULL; sp = sp->snext) {
  522+                if (sp->sname[0] == '*') {
  523+                        /* unnamed member, recurse down */
  524+                        if ((sp2 = findmember(sp->ssue->sylnk, s))) {
  525+                                sp3 = tmpalloc(sizeof (struct symtab));
  526+                                *sp3 = *sp2;
  527+                                sp3->soffset += sp->soffset;
  528+                                return sp3;
  529+                        }
  530+                } else if (sp->sname == s)
  531+                        return sp;
  532+        }
  533+        return NULL;
  534+}
  535+
  536+
<_512537 /*
 513538  * Check if there will be a lost label destination inside of a ?:
 514539  * It cannot be reached so just print it out.
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-08-29 03:14 +0200