Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.245
 
1.246
 
MAIN:ragge:20090124133503
 
pftn.c
_>131131 static void alprint(union arglist *al, int in);
 132132 static void lcommadd(struct symtab *sp);
 133133 extern int fun_inline;
<> 134+struct suedef *sueget(struct suedef *p);
134135 
 135136 int ddebug = 0;
 136137 
     
 !
140141  */
 141142 
 142143 void
<>143 -defid(NODE *q, int class)
  144+defid(NODE *ap, int class)
144145 {
 145146         struct symtab *p;
 146147         TWORD type, qual;
 147148         TWORD stp, stq;
 148149         int scl;
 149150         union dimfun *dsym, *ddef;
 150151         int slev, temp, changed;
<> 152+        NODE *q = ap;
151153 
 152154         if (q == NIL)
 153155                 return/* an error was detected */
 154156 
<> 157+#ifdef GCC_COMPAT
  158+        if (q->n_op == CM)
  159+                q = q->n_left;
  160+#endif
155161         p = q->n_sp;
 156162 
 157163         if (p->sname == NULL)
     
 !
246252 #endif
 247253 
 248254         /* check that redeclarations are to the same structure */
<>249 -        if ((temp == STRTY || temp == UNIONTY) && p->ssue != q->n_sue) {
 250 -                goto mismatch;
  255+        if (temp == STRTY || temp == UNIONTY) {
  256+                struct suedef *sue1, *sue2;
  257+                GETSUE(sue1, p->ssue);
  258+                GETSUE(sue2, q->n_sue);
  259+                if (sue1 != sue2)
  260+                        goto mismatch;
251261         }
 252262 
 253263         scl = p->sclass;
     
 !
369379         p->soffset = NOOFFSET;
 370380         if (q->n_sue == NULL)
 371381                 cerror("q->n_sue == NULL");
<> 382+#ifdef GCC_COMPAT
  383+        if (ap != q) {
  384+                struct gcc_attrib *ga;
  385+                struct suedef *sue;
  386+
  387+                sue = q->n_sue = sueget(q->n_sue);
  388+                sue->suega = gcc_attr_parse(ap->n_right);
  389+                if ((ga = gcc_get_attr(sue, GCC_ATYP_ALIGNED))) {
  390+                        sue->suealign = ga->a1.iarg;
  391+                        SETOFF(sue->suesize, sue->suealign);
  392+                }
  393+                ap->n_right = bcon(0);
  394+        }
  395+#endif
372396         p->ssue = q->n_sue;
 373397 
 374398         /* copy dimensions */
     
 !
10471071                         }
 10481072                 }
 10491073 
<>1050 -        GETSUE(sue, sue);
  1074+        GETSUE(sue, sue)
  1075+                if (sue->suealign)
  1076+                        break;
10511077         if (sue->suealign == 0)
 10521078                 uerror("no alignment");
 10531079         return sue->suealign;
     
 !
14281454 
 14291455         defid(p, class);
 14301456 
<> 1457+#ifdef GCC_COMPAT
  1458+        if (p->n_op == CM)
  1459+                p = p->n_left;
  1460+#endif
  1461+
14311462         sp = p->n_sp;
 14321463         /* check if forward decl */
 14331464         if (ISARY(sp->stype) && sp->sdf->ddim == NOOFFSET)
     
 !
16951726                         cerror("typenode");
 16961727                 gcc_tcattrfix(tc.saved, tc.posta);
 16971728         }
<>1698 -        if (tc.prea) {
 1699 -#if 0
 1700 -                werror("declarator attributes currently unsupported");
17011729 #endif
<>1702 -                tfree(tc.prea);
 1703 -        }
 1704 -#endif
17051730         q = (tc.saved ? tc.saved : mkty(tc.type, 0, 0));
 17061731         q->n_qual = tc.qual;
 17071732         q->n_lval = tc.class;
 17081733         if (BTYPE(q->n_type) == UNDEF)
 17091734                 MODTYPE(q->n_type, INT);
<> 1735+#ifdef GCC_COMPAT
  1736+        if (tc.prea)
  1737+                q = cmop(q, tc.prea);
  1738+#endif
17101739         return q;
 17111740 
 17121741 bad:    uerror("illegal type combination");
     
 !
17451774         unsigned int t;
 17461775         int ntdim, i;
 17471776 
<> 1777+#ifdef GCC_COMPAT
  1778+        NODE *gcs;
  1779+
  1780+        if (typ->n_op == CM) {
  1781+                /* has attributes */
  1782+                gcs = tcopy(typ->n_right);
  1783+                typ = typ->n_left;
  1784+        } else
  1785+                gcs = NULL;
  1786+#endif
  1787+
17481788         if (typ->n_op != TYPE)
 17491789                 cerror("tymerge: arg 1");
 17501790 
     
 !
18071847 //if (idp && idp->n_sue) { printf("residp ");
 18081848 //      GETSUE(sue, idp->n_sue) dump_attr(sue->suega); }
 18091849 
<> 1850+#ifdef GCC_COMPAT
  1851+        if (gcs)
  1852+                idp = cmop(idp, gcs);
  1853+#endif
  1854+
<_18101855         return(idp);
 18111856 }
 18121857 
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-20 18:32 +0200