ref: 0f7e2ef56343b28a16bd01e35151bb79df7604e9
parent: 8e09ca155408ff203df2e02bce16d305332d955e
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu May 19 07:10:41 EDT 2016
[cc1] Reduce align type to only 1 byte It is impossible to have an aligment bigger than 255 bytes
--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -37,7 +37,7 @@
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 */
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -263,7 +263,7 @@
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,
--- a/cc1/types.c
+++ b/cc1/types.c
@@ -171,7 +171,9 @@
{
Symbol **sp;
Type *aux;
- unsigned long n, size, align, a;
+ unsigned long size;
+ int align, a;
+ TINT n;
switch (tp->op) {
case ARY: