Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.325
 
1.326
 
MAIN:ragge:20110623133823
 
pftn.c
_>490490 void
 491491 ftnend()
 492492 {
<> 493+        struct attr *gc, *gd;
493494         extern NODE *cftnod;
 494495         extern struct savbc *savbc;
 495496         extern struct swdef *swpole;
     
 !
520521                 if (swpole != NULL)
 521522                         cerror("switch error");
 522523         }
<> 524+        if (cftnsp) {
  525+                gc = attr_find(cftnsp->sap, GCC_ATYP_CONSTRUCTOR);
  526+                gd = attr_find(cftnsp->sap, GCC_ATYP_DESTRUCTOR);
  527+                if (gc || gd) {
  528+                        struct symtab sts = *cftnsp;
  529+                        NODE *p;
  530+                        sts.stype = INCREF(sts.stype);
  531+                        p = nametree(&sts);
  532+                        p->n_op = ICON;
  533+                        if (gc) {
  534+                                locctr(CTORS, &sts);
  535+                                inval(0, SZPOINT(0), p);
  536+                        }
  537+                        if (gd) {
  538+                                locctr(DTORS, &sts);
  539+                                inval(0, SZPOINT(0), p);
  540+                        }
  541+                        tfree(p);
  542+                }
  543+        }
523544         savbc = NULL;
 524545         lparam = NULL;
 525546         cftnsp = NULL;
     
 !
12361257         char *s = sp->sname;
 12371258         NODE *p;
 12381259 
<> 1260+        locctr(STRNG, sp);
12391261         defloc(sp);
 12401262         p = xbcon(0, NULL, WCHAR_TYPE);
 12411263         do {
     
 !
12591281 {
 12601282         char *s, *str;
 12611283 
<> 1284+        locctr(STRNG, sp);
12621285         defloc(sp);
 12631286         str = sp->sname;
 12641287 
     
 !
15191542 }
 15201543 
 15211544 /*
<> 1545+ * Check if this symbol should be a common or must be handled in data seg.
  1546+ */
  1547+static void
  1548+commchk(struct symtab *sp)
  1549+{
  1550+        if ((sp->sflags & STLS) || attr_find(sp->sap, GCC_ATYP_SECTION)) {
  1551+                /* TLS handled in data segment */
  1552+                beginit(sp);
  1553+                endinit(1);
  1554+        } else {
  1555+                symdirec(sp);
  1556+                defzero(sp);
  1557+        }
  1558+}
  1559+
  1560+/*
15221561  * handle unitialized declarations assumed to be not functions:
 15231562  * int a;
 15241563  * extern int a;
     
 !
15701609                 if (blevel == 0)
 15711610                         lcommadd(p->n_sp);
 15721611                 else
<>1573 -                        defzero(p->n_sp);
  1612+                        commchk(p->n_sp);
15741613                 break;
 15751614         }
 15761615 }
     
 !
16311670 
 16321671         SLIST_FOREACH(lc, &lhead, next) {
 16331672                 if (lc->sp != NULL)
<>1634 -                        defzero(lc->sp);
  1673+                        commchk(lc->sp);
<_16351674         }
 16361675 }
 16371676 
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-10-31 05:51 +0100