Skip to contentSkip to conversation

Marking anonymous string.

PATCH Applied Christopher Li 2 participants 2 messages Jan 17, 2007 – Jan 27, 2007 Sparse checker

lore
Share & tools
lore

Christopher Li

author maintainer
#0 lore raw

PATCH 1/1 Marking anonymous string.

The back end need to generate some storage for anonymous string. This simplify testing of anonymous string.

symbol.h +2 -1
Index: sparse/symbol.h
===================================================================
@@ -118,7 +118,8 @@ struct symbol {
 					initialized:1,
 					examined:1,
 					expanding:1,
-					evaluated:1;
+					evaluated:1,
+					string:1;
 			struct expression *array_size;
 			struct ctype ctype;
 			struct symbol_list *arguments;
evaluate.c +1 -0
Index: sparse/evaluate.c
===================================================================
@@ -74,6 +74,7 @@ static struct symbol *evaluate_string(st
 	sym->array_size = alloc_const_expression(expr->pos, length);
 	sym->bit_size = bits_in_char * length;
 	sym->ctype.alignment = 1;
+	sym->string = 1;
 	sym->ctype.modifiers = MOD_STATIC;
 	sym->ctype.base_type = array;
 	sym->initializer = initstr;
#1 lore raw
Quoted 2 lines · Christopher Li

The back end need to generate some storage for anonymous string. This simplify testing of anonymous string.

Applied; thanks.

- Josh Triplett