Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.239
 
1.240
 
MAIN:ragge:20081213200332
 
pftn.c
_>10641064                         }
 10651065                 }
 10661066 
<>1067 -        switch( BTYPE(ty) ){
 1068 -
 1069 -        case UNIONTY:
 1070 -        case STRTY:
 1071 -                return((unsigned int)sue->suealign);
 1072 -        case BOOL:
 1073 -                return (ALBOOL);
 1074 -        case CHAR:
 1075 -        case UCHAR:
 1076 -                return (ALCHAR);
 1077 -        case FLOAT:
 1078 -                return (ALFLOAT);
 1079 -        case LDOUBLE:
 1080 -                return (ALLDOUBLE);
 1081 -        case DOUBLE:
 1082 -                return (ALDOUBLE);
 1083 -        case LONGLONG:
 1084 -        case ULONGLONG:
 1085 -                return (ALLONGLONG);
 1086 -        case LONG:
 1087 -        case ULONG:
 1088 -                return (ALLONG);
 1089 -        case SHORT:
 1090 -        case USHORT:
 1091 -                return (ALSHORT);
 1092 -        default:
 1093 -                return (ALINT);
 1094 -        }
  1067+        if (sue->suealign == 0)
  1068+                uerror("no alignment");
  1069+        return sue->suealign;
10951070 }
 10961071 
 10971072 /* compute the size associated with type ty,
     
 !
17291704         (*ntdim)++;
 17301705 }
 17311706 
<>1732 -/* merge type typ with identifier idp  */
  1707+/*
  1708+ * merge type typ with identifier idp.
  1709+ * idp is returned as a NAME node with correct types.
  1710+ * typ is untouched.
  1711+ */
17331712 NODE *
 17341713 tymerge(NODE *typ, NODE *idp)
 17351714 {
 17361715         NODE *p;
 17371716         union dimfun *j;
 17381717         struct tylnk *base, tylnk, *tylkp;
<> 1718+        struct suedef *sue;
17391719         unsigned int t;
 17401720         int ntdim, i;
 17411721 
     
 !
17501730         }
 17511731 #endif
 17521732 
<> 1733+        sue = idp->n_sue;
  1734+
17531735         idp->n_type = typ->n_type;
 17541736         idp->n_qual |= typ->n_qual;
 17551737 
     
 !
17811763         if ((t = BTYPE(idp->n_type)) != STRTY && t != UNIONTY && t != ENUMTY)
 17821764                 idp->n_sue = MKSUE(t);
 17831765 
<> 1766+#if 1
  1767+        if (sue) {
  1768+                struct suedef *s = permalloc(sizeof(struct suedef));
  1769+                *s = *idp->n_sue;
  1770+                idp->n_sue = s;
  1771+                if (sue->suealigned > s->suealign)
  1772+                        s->suealign = sue->suealigned;
  1773+                s->suepacked = sue->suepacked;
  1774+        }
  1775+#else
  1776+        if (sue) {
  1777+                if (sue->suealigned > idp->n_sue->suealign)
  1778+                        idp->n_sue->suealign = sue->suealigned;
  1779+                idp->n_sue->suepacked = sue->suepacked;
  1780+        }
  1781+#endif
  1782+
17841783         if (idp->n_op != NAME) {
 17851784                 for (p = idp->n_left; p->n_op != NAME; p = p->n_left)
 17861785                         nfree(p);
     
 !
23272326                                         MKTY(apole->node, arrt, 0, 0)
 23282327                                 }
 23292328                         } else if (ISSOU(BTYPE(type))) {
<>2330 -                                if (apole->node->n_sue != al[1].sue)
  2329+                                if (apole->node->n_sue->sylnk != al[1].sue->sylnk)
23312330                                         goto incomp;
 23322331                         }
 23332332                         goto out;
     
 !
23472346                 /* Check for struct/union compatibility */
 23482347                 if (type == arrt) {
 23492348                         if (ISSOU(BTYPE(type))) {
<>2350 -                                if (apole->node->n_sue == al[1].sue)
  2349+                                if (apole->node->n_sue->sylnk == al[1].sue->sylnk)
23512350                                         goto out;
 23522351                         } else
 23532352                                 goto out;
     
 !
24722471                 t2 = usym->type;
 24732472                 if (ISSTR(ty)) {
 24742473                         usym++, udef++;
<>2475 -                        if (usym->sue != udef->sue)
  2474+                        if (usym->sue->sylnk != udef->sue->sylnk)
<_24762475                                 return 1;
 24772476                 }
 24782477 
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 08:44 +0100