scc

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

commit a300bb7984c6d77b298981e1c6d6be00b4ab56b3
parent 6124426ed00d4e0802766a6100b8032155f0bb44
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 26 Jan 2016 12:43:16 +0100

[cc1] Rename ISINIT to HASINIT

This new name represents better the objective of the flag,
because ISINIT created some confusion about the symbol
itself being an initializer.

Diffstat:
cc1/cc1.h | 2+-
cc1/code.c | 2+-
cc1/expr.c | 2+-
cc1/init.c | 2+-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cc1/cc1.h b/cc1/cc1.h @@ -188,7 +188,7 @@ enum { ISSTRING = 4096, ISTYPEDEF = 8192, ISINITLST = 16384, - ISINIT = 32768 + HASINIT = 32768 }; /* lexer mode, compiler or preprocessor directive */ diff --git a/cc1/code.c b/cc1/code.c @@ -385,7 +385,7 @@ emitdcl(unsigned op, void *arg) if (sym->flags & ISFIELD) printf("\t#%c%llX", sizettype->letter, sym->u.i); sym->flags |= ISEMITTED; - if ((sym->flags & ISINIT) == 0) + if ((sym->flags & HASINIT) == 0) putchar('\n'); } diff --git a/cc1/expr.c b/cc1/expr.c @@ -619,7 +619,7 @@ primary(void) switch (yytoken) { case STRING: np = constnode(sym); - sym->flags |= ISINIT; + sym->flags |= HASINIT; emit(ODECL, sym); emit(OINIT, np); np = decay(varnode(sym)); diff --git a/cc1/init.c b/cc1/init.c @@ -307,7 +307,7 @@ initializer(Symbol *sym, Type *tp) errorp("initializer element is not constant"); return; } - sym->flags |= ISINIT; + sym->flags |= HASINIT; emit(ODECL, sym); emit(OINIT, np); sym->flags |= ISDEFINED;