commit 508ac8d838c64275adceeaad9b24fad8d711e3e3
Author:     Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Thu May 19 11:10:41 2016 +0200
Commit:     Roberto E. Vargas Caballero <[email protected]>
CommitDate: Thu May 19 11:10:41 2016 +0200

    [cc1] Reduce align type to only 1 byte
    
    It is impossible to have an aligment bigger than 255 bytes

diff --git a/cc1/cc1.h b/cc1/cc1.h
index 03ced70..d586d5d 100644
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -37,7 +37,7 @@ struct type {
        char letter;                /* letter of the type */
        unsigned char prop;         /* type properties */
        unsigned long size;         /* sizeof the type */
-       unsigned long align;        /* align of the type */
+       unsigned char align;        /* align of the type */
        Type *type;                 /* base type */
        Symbol *tag;                /* symbol of the strug tag */
        Type *next;                 /* next element in the hash */
diff --git a/cc1/code.c b/cc1/code.c
index adb242e..c410545 100644
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -263,7 +263,7 @@ emittype(Type *tp)
                        emittype((*sp)->type);
                emitletter(tp);
                tag = tp->tag->name;
-               printf("\t\"%s\t#%c%lX\t#%c%lX\n",
+               printf("\t\"%s\t#%c%lX\t#%c%X\n",
                       (tag) ? tag : "",
                       sizettype->letter,
                       tp->size,
diff --git a/cc1/types.c b/cc1/types.c
index f01dc5f..40b176b 100644
--- a/cc1/types.c
+++ b/cc1/types.c
@@ -171,7 +171,9 @@ typesize(Type *tp)
 {
        Symbol **sp;
        Type *aux;
-       unsigned long n, size, align, a;
+       unsigned long size;
+       int align, a;
+       TINT n;
 
        switch (tp->op) {
        case ARY:

Reply via email to