Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.244
 
1.245
 
MAIN:ragge:20090114211001
 
pftn.c
_>100100         int     rstr;
 101101         struct  symtab *rsym;
 102102         struct  symtab *rb;
<>103 -        gcc_ap_t *rgap;
  103+        NODE    *rgp;
104104         int     flags;
 105105 #define LASTELM 1
 106106 } *rpole;
     
 !
611611 /*
 612612  * Alloc sue from either perm or tmp memory, depending on blevel.
 613613  */
<>614 -static struct suedef *
  614+struct suedef *
615615 sueget(struct suedef *p)
 616616 {
 617617         struct suedef *sue;
     
 !
791791  * begining of structure or union declaration
 792792  */
 793793 struct rstack *
<>794 -bstruct(char *name, int soru, gcc_ap_t *gap)
  794+bstruct(char *name, int soru, NODE *gp)
795795 {
 796796         struct rstack *r;
 797797         struct symtab *sp;
     
 !
812812         r->rsou = soru;
 813813         r->rsym = sp;
 814814         r->rb = NULL;
<>815 -        r->rgap = gap;
  815+        r->rgp = gp;
816816         r->rnext = rpole;
 817817         rpole = r;
 818818 
     
 !
821821 
 822822 /*
 823823  * Called after a struct is declared to restore the environment.
<>824 - * Alignment and packing are handled here.
825824  * - If ALSTRUCT is defined, this will be the struct alignment and the
 826825  *   struct size will be a multiple of ALSTRUCT, otherwise it will use
 827826  *   the alignment of the largest struct member.
<>828 - * - If suep->suealigned is set, then it will specify the alignment.
 829 - * - If suep->suepacked is set, it will pack all struct members.
830827  */
 831828 NODE *
 832829 dclstruct(struct rstack *r)
     
 !
876873                     r->rsym ? r->rsym->sname : "??",
 877874                     sue->suesize, sue->suealign);
 878875         }
<>879 -#endif
 880 -
 881 -#ifdef STABS
 882 -        if (gflag)
 883 -                stabs_struct(r->rsym, sue);
 884 -#endif
 885 -
 886 -#ifdef PCC_DEBUG
887876         if (ddebug>1) {
 888877                 printf("\tsize %d align %d link %p\n",
 889878                     sue->suesize, sue->suealign, sue->suem);
     
 !
893882         }
 894883 #endif
 895884 
<>896 -        if (r->rgap) {
 897 -                sue = sueget(sue);
 898 -                sue->suega = r->rgap;
 899 -        }
  885+#ifdef STABS
  886+        if (gflag)
  887+                stabs_struct(r->rsym, sue);
  888+#endif
900889 
 901890         rpole = r->rnext;
 902891         n = mkty(r->rsou == STNAME ? STRTY : UNIONTY, 0, sue);
 903892         n->n_qual |= 1; /* definition place */
<> 893+        n->n_left = r->rgp;
904894         return n;
 905895 }
 906896 
     
 !
10461036         for( i=0; i<=(SZINT-BTSHIFT-1); i+=TSHIFT ){
 10471037                 switch( (ty>>i)&TMASK ){
 10481038 
<>1049 -                case FTN:
 1050 -                        cerror("compiler takes alignment of function");
10511039                 case PTR:
 10521040                         return(ALPOINT);
 10531041                 case ARY:
 10541042                         continue;
<> 1043+                case FTN:
  1044+                        cerror("compiler takes alignment of function");
10551045                 case 0:
 10561046                         break;
 10571047                         }
 10581048                 }
 10591049 
<> 1050+        GETSUE(sue, sue);
10601051         if (sue->suealign == 0)
 10611052                 uerror("no alignment");
 10621053         return sue->suealign;
     
 !
10951086 
 10961087         if (sue == NULL)
 10971088                 cerror("bad tsize sue");
<> 1089+        GETSUE(sue, sue);
10981090         sz = sue->suesize;
 10991091 #ifdef GCC_COMPAT
 11001092         if (ty == VOID)
     
 !
15751567                         /* typedef, enum or struct/union */
 15761568                         if (tc->saved || tc->type)
 15771569                                 tc->err = 1;
<> 1570+#ifdef GCC_COMPAT
  1571+                        if (ISSOU(p->n_type) && p->n_left) {
  1572+                                if (tc->posta)
  1573+                                        cerror("typwalk");
  1574+                                tc->posta = p->n_left;
  1575+                        }
  1576+#endif
15781577                         tc->saved = tcopy(p);
 15791578                         break;
 15801579                 }
     
 !
17571756         }
 17581757 #endif
 17591758 
<> 1759+//if (idp && idp->n_sue) { printf("idp "); dump_attr(idp->n_sue->suega); }
  1760+//if (typ && typ->n_sue) { printf("typ "); dump_attr(typ->n_sue->suega); }
17601761         sue = idp->n_sue;
 17611762 
 17621763         idp->n_type = typ->n_type;
     
 !
17841785 
 17851786         /* now idp is a single node: fix up type */
 17861787 
<> 1788+/* Start: ensure that this des not cause any problem */
17871789         idp->n_type = ctype(idp->n_type);
 17881790 
 17891791         /* in case ctype has rewritten things */
 17901792         if ((t = BTYPE(idp->n_type)) != STRTY && t != UNIONTY && t != ENUMTY)
 17911793                 idp->n_sue = MKSUE(t);
<> 1794+/* End: ensure that this des not cause any problem */
17921795 
<>1793 -#if 1
 1794 -        if (sue) {
 1795 -                struct suedef *s = permalloc(sizeof(struct suedef));
 1796 -                *s = *idp->n_sue;
 1797 -                idp->n_sue = s;
 1798 -#if 0
 1799 -                if (sue->suealigned > s->suealign)
 1800 -                        s->suealign = sue->suealigned;
 1801 -                s->suepacked = sue->suepacked;
 1802 -                s->suesection = sue->suesection;
 1803 -#endif
 1804 -        }
 1805 -#else
 1806 -        if (sue) {
 1807 -                if (sue->suealigned > idp->n_sue->suealign)
 1808 -                        idp->n_sue->suealign = sue->suealigned;
 1809 -                idp->n_sue->suepacked = sue->suepacked;
 1810 -        }
 1811 -#endif
 1812 -
18131796         if (idp->n_op != NAME) {
 18141797                 for (p = idp->n_left; p->n_op != NAME; p = p->n_left)
 18151798                         nfree(p);
 18161799                 nfree(p);
 18171800                 idp->n_op = NAME;
 18181801         }
 18191802 
<> 1803+        if (sue && sue->suega) {
  1804+                idp->n_sue = sueget(idp->n_sue);
  1805+                idp->n_sue->suega = sue->suega;
  1806+        }
  1807+//if (idp && idp->n_sue) { printf("residp ");
  1808+//      GETSUE(sue, idp->n_sue) dump_attr(sue->suega); }
  1809+
18201810         return(idp);
 18211811 }
 18221812 
     
 !
21682158                 printf("arg %d: ", i++);
 21692159                 tprint(stdout, al->type, 0);
 21702160                 if (ISARY(al->type)) {
<> 2161+                        al++;
<_21712162                         printf(" dim %d\n", al->df->ddim);
 21722163                 } else if (BTYPE(al->type) == STRTY ||
 21732164                     BTYPE(al->type) == UNIONTY) {
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 09:26 +0100