shithub: scc

Download patch

ref: a300bb7984c6d77b298981e1c6d6be00b4ab56b3
parent: 6124426ed00d4e0802766a6100b8032155f0bb44
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Tue Jan 26 07:43:16 EST 2016

[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.

--- a/cc1/cc1.h
+++ b/cc1/cc1.h
@@ -188,7 +188,7 @@
 	ISSTRING   =    4096,
 	ISTYPEDEF  =    8192,
 	ISINITLST  =   16384,
-	ISINIT    =    32768
+	HASINIT    =   32768
 };
 
 /* lexer mode, compiler or preprocessor directive */
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -385,7 +385,7 @@
 	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');
 }
 
--- a/cc1/expr.c
+++ b/cc1/expr.c
@@ -619,7 +619,7 @@
 	switch (yytoken) {
 	case STRING:
 		np = constnode(sym);
-		sym->flags |= ISINIT;
+		sym->flags |= HASINIT;
 		emit(ODECL, sym);
 		emit(OINIT, np);
 		np = decay(varnode(sym));
--- a/cc1/init.c
+++ b/cc1/init.c
@@ -307,7 +307,7 @@
 			errorp("initializer element is not constant");
 			return;
 		}
-		sym->flags |= ISINIT;
+		sym->flags |= HASINIT;
 		emit(ODECL, sym);
 		emit(OINIT, np);
 		sym->flags |= ISDEFINED;