scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit cdd649037ff739763ef976d4ca707ec021f24401
parent e703cf33b768fa08ab5b26ca5f85eba756212088
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue,  4 Aug 2015 17:26:29 +0200

Remove STRUCT emit() operators

These operators must be removed because they must be emited
in emittype(), like all the other types.

Diffstat:
cc1/cc1.h | 2--
cc1/code.c | 4----
cc1/decl.c | 2--
3 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/cc1/cc1.h b/cc1/cc1.h @@ -260,12 +260,10 @@ enum { OLABEL, ODEFAULT, OCASE, - OSTRUCT, OJUMP, OBRANCH, OEXPR, OEFUN, - OESTRUCT, OELOOP, OBLOOP, OFUN, diff --git a/cc1/code.c b/cc1/code.c @@ -56,11 +56,9 @@ char *optxt[] = { [OLABEL] = "L%d\n", [ODEFAULT] = "\tf\tL%d\n", [OCASE] = "\tw\tL%d", - [OSTRUCT] = "S%d\t(\n", [OJUMP] = "\tj\tL%d\n", [OBRANCH] = "\tj\tL%d", [OEFUN] = "}", - [OESTRUCT] = ")", [OELOOP] = "\tb", [OBLOOP] = "\td" }; @@ -111,11 +109,9 @@ void (*opcode[])(unsigned, void *) = { [OLABEL] = emitsymid, [ODEFAULT] = emitsymid, [OCASE] = emitsymid, - [OSTRUCT] = emitsymid, [OJUMP] = emitsymid, [OBRANCH] = emitsymid, [OEFUN] = emittext, - [OESTRUCT] = emittext, [OELOOP] = emittext, [OBLOOP] = emittext, [OFUN] = emitfun, diff --git a/cc1/decl.c b/cc1/decl.c @@ -342,7 +342,6 @@ structdcl(void) if (tagtype->defined) error("redefinition of struct/union '%s'", yytext); tagtype->defined = 1; - emit(OSTRUCT, tagsym); while (!accept('}')) { Type *base, *tp; @@ -378,7 +377,6 @@ structdcl(void) expect(';'); } - emit(OESTRUCT, NULL); if ((n = bp - buff) != 0) { siz = sizeof(Type *) * n; tagtype->n.elem = n;