shithub: scc

Download patch

ref: a1f4b88d0fd4e5d3b1b537f69db56fc282a2964f
parent: 8d6c4f8946dfb91a79e70efc04db7d089d4abbf0
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Jan 22 10:37:28 EST 2016

Use " to mark names of variables

This allow to lead the parser easier.

--- a/cc1/arch/i386/arch.h
+++ b/cc1/arch/i386/arch.h
@@ -30,8 +30,4 @@
 #define L_ULONG     L_UINT32
 #define L_LLONG     L_INT64
 #define L_ULLONG    L_UINT64
-#define L_BOOL      'B'
-#define L_FLOAT     'J'
-#define L_DOUBLE    'D'
-#define L_LDOUBLE   'H'
 #define L_ENUM      L_INT
--- a/cc1/code.c
+++ b/cc1/code.c
@@ -300,7 +300,7 @@
 		while (isprint(*bp) && bp < lim)
 			++bp;
 		if ((n = bp - s) > 1)
-			printf("\t#\"%.*s\n", n, s);
+			printf("\t#%c%.*s\n", L_NAME, n, s);
 		else
 			bp = s;
 		if (bp == lim)
@@ -386,8 +386,7 @@
 	emitvar(sym);
 	putchar('\t');
 	emitletter(sym->type);
-	if (sym->name)
-		printf("\t%s", sym->name);
+	printf("\t\"%s", (sym->name) ? sym->name : "");
 	if (op != OFUN)
 		putchar('\n');
 	sym->flags |= ISEMITTED;
--- a/cc1/init.c
+++ b/cc1/init.c
@@ -100,6 +100,7 @@
 	Type *btp;
 	size_t len;
 	char *s;
+	int isstring;
 
 	if ((tp->op == ARY || tp->op == STRUCT) &&
 	    yytoken != '{' && yytoken != STRING) {
@@ -106,11 +107,10 @@
 		return initlist(tp);
 	}
 
+	isstring = yytoken == STRING;
 	np = (yytoken == '{') ? initlist(tp) : assign();
 
-	if (np->left &&
-	    np->left->sym->flags & ISSTRING &&
-	    tp->op == ARY) {
+	if (isstring && tp->op == ARY) {
 		sym = np->left->sym;
 		btp = tp->type;
 		if (btp != chartype  &&
--- a/cc1/tests/test001.c
+++ b/cc1/tests/test001.c
@@ -4,13 +4,13 @@
 error:
 output:
 F3	I	P	E
-X4	F3	printf
+X4	F3	"printf
 F5	I
-G6	F5	main
+G6	F5	"main
 {
 \
 V8	K	#13
-Y7	V8
+Y7	V8	"
 (
 	#"hello world
 	#K0A
--- a/cc1/tests/test002.c
+++ b/cc1/tests/test002.c
@@ -3,17 +3,17 @@
 description: Test forward references before definition of types
 error:
 output:
-G4	P	x
+G4	P	"x
 F7	I
-G8	F7	main
+G8	F7	"main
 {
 \
 S2	S
-M5	I	i
-M6	P	next
-A9	S2	y
-A10	P	p
-A11	N	n
+M5	I	"i
+M6	P	"next
+A9	S2	"y
+A10	P	"p
+A11	N	"n
 	A9	M5	.I	#I0	:I
 	G4	@S2	A9	:S2
 	A11	#N0	:N	A10	A9	'P	:P	,P
--- a/cc1/tests/test003.c
+++ b/cc1/tests/test003.c
@@ -4,17 +4,17 @@
 error:
 output:
 F1	I
-G2	F1	foo
+G2	F1	"foo
 {
 \
 	r	#I2A
 }
-G3	F1	bar
+G3	F1	"bar
 {
 \
 	r	#I18
 }
-G4	F1	main
+G4	F1	"main
 {
 \
 	r	G2	cI
--- a/cc1/tests/test004.c
+++ b/cc1/tests/test004.c
@@ -4,10 +4,10 @@
 error:
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	x
+A3	I	"x
 	A3	#I0	:I
 	A3	A3	#I2	+I	:I
 	A3	A3	#I1	-I	:I
--- a/cc1/tests/test005.c
+++ b/cc1/tests/test005.c
@@ -4,10 +4,10 @@
 error:
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	x
+A3	I	"x
 	A3	#I3	:I
 	A3	A3	#I0	=I	:I
 	A3	A3	#I0	=I	:I
--- a/cc1/tests/test006.c
+++ b/cc1/tests/test006.c
@@ -6,9 +6,9 @@
 test006.c:8: warning: conditional expression is constant
 test006.c:11: warning: conditional expression is constant
 output:
-G1	K	c
+G1	K	"c
 F2	I	E
-G3	F2	main
+G3	F2	"main
 {
 \
 	j	L4	#I0
--- a/cc1/tests/test007.c
+++ b/cc1/tests/test007.c
@@ -4,10 +4,10 @@
 error:
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	x
+A3	I	"x
 	A3	#IA	:I
 	j	L6
 	e
--- a/cc1/tests/test008.c
+++ b/cc1/tests/test008.c
@@ -4,10 +4,10 @@
 error:
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	x
+A3	I	"x
 	A3	#I0	:I
 	e
 L4
--- a/cc1/tests/test009.c
+++ b/cc1/tests/test009.c
@@ -4,10 +4,10 @@
 error:
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	x
+A3	I	"x
 	A3	#I0	:I
 	j	L6
 	e
--- a/cc1/tests/test010.c
+++ b/cc1/tests/test010.c
@@ -7,10 +7,10 @@
 test010.c:31: warning: conditional expression is constant
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	x
+A3	I	"x
 	A3	#I0	:I
 	j	L6
 	e
--- a/cc1/tests/test011.c
+++ b/cc1/tests/test011.c
@@ -6,7 +6,7 @@
 test011.c:14: warning: 'start' defined but not used
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
 L3
--- a/cc1/tests/test012.c
+++ b/cc1/tests/test012.c
@@ -5,10 +5,10 @@
 test012.c:39: warning: 'foo' defined but not used
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	x
+A3	I	"x
 	A3	#I0	:I
 	s	L5	A3
 L6
--- a/cc1/tests/test013.c
+++ b/cc1/tests/test013.c
@@ -6,19 +6,19 @@
           short is equal to int, and unsigned short is equal to unsigned.
 error:
 output:
-G1	I	a
-G2	N	b
-G3	K	c
-G4	C	d
-G5	K	e
-G6	W	f
-G7	Z	g
-G8	Q	h
-G9	O	i
-G10	I	j
-G11	N	k
+G1	I	"a
+G2	N	"b
+G3	K	"c
+G4	C	"d
+G5	K	"e
+G6	W	"f
+G7	Z	"g
+G8	Q	"h
+G9	O	"i
+G10	I	"j
+G11	N	"k
 F12	I
-G13	F12	main
+G13	F12	"main
 {
 \
 	G1	G2	gI	:I
--- a/cc1/tests/test014.c
+++ b/cc1/tests/test014.c
@@ -19,30 +19,30 @@
 test014.c:35: warning: 'par' defined but not used
 test014.c:38: error: conflicting types for 'd'
 output:
-G1	I	a
-Y2	K	b
-X3	I	c
+G1	I	"a
+Y2	K	"b
+X3	I	"c
 F5	I
-G6	F5	func1
+G6	F5	"func1
 {
 \
-A7	I	h
-T8	K	i
-R9	W	j
-X10	I	k
-T11	Z	a
+A7	I	"h
+T8	K	"i
+R9	W	"j
+X10	I	"k
+T11	Z	"a
 	r	#I0
 }
 F13	0	I
-G14	F13	func2
+G14	F13	"func2
 {
-R12	I	par
+R12	I	"par
 \
-A15	I	par
+A15	I	"par
 }
-T17	F13	func3
+T17	F13	"func3
 {
-R16	I	par
+R16	I	"par
 \
 }
 */
--- a/cc1/tests/test015.c
+++ b/cc1/tests/test015.c
@@ -5,20 +5,20 @@
 test015.c:53: error: label 's' already defined
 output:
 S8	s2
-M9	I	s
+M9	I	"s
 S5	s1
-M6	I	s
-M10	S8	s1
+M6	I	"s
+M10	S8	"s1
 S2	s
-M11	S5	s
-G12	S2	s2
+M11	S5	"s
+G12	S2	"s2
 F13	I
-G14	F13	main
+G14	F13	"main
 {
 \
 	j	L15
-A16	S2	s
-A17	I	s
+A16	S2	"s
+A17	I	"s
 	r	A17
 	r	A16	M11	.S5	M6	.I	A16	M11	.S5	M10	.S8	M9	.I	+I
 L15
--- a/cc1/tests/test016.c
+++ b/cc1/tests/test016.c
@@ -5,13 +5,13 @@
 test016.c:43: error: redefinition of 'func2'
 test016.c:47: error: incompatible types when assigning
 output:
-G1	I	g
+G1	I	"g
 F2	I
-G3	F2	func1
+G3	F2	"func1
 {
 \
-A4	I	x
-A6	P	p
+A4	I	"x
+A6	P	"p
 	G1	#I1	:I
 	A4	#I1	:I
 	A6	A4	'P	:P
@@ -26,12 +26,12 @@
 L8
 	r	#I0
 }
-G9	F2	func2
+G9	F2	"func2
 {
 \
-A10	I	x
-A11	P	p
-A13	P	pp
+A10	I	"x
+A11	P	"p
+A13	P	"pp
 	A10	#I1	:I
 	A11	A10	'P	:P
 	A13	A11	'P	:P
--- a/cc1/tests/test017.c
+++ b/cc1/tests/test017.c
@@ -4,16 +4,16 @@
 error:
 output:
 F9	I	E
-G10	F9	main
+G10	F9	"main
 {
 \
 S2	s1
-M3	I	y
-M4	I	z
-A11	S2	nested
+M3	I	"y
+M4	I	"z
+A11	S2	"nested
 S6	s2
-M8	P	p
-A12	S6	v
+M8	P	"p
+A12	S6	"v
 	A12	M8	.P	A11	'P	:P
 	A12	M8	.P	@S2	M3	.I	#I1	:I
 	A12	M8	.P	@S2	M4	.I	#I2	:I
--- a/cc1/tests/test018.c
+++ b/cc1/tests/test018.c
@@ -4,16 +4,16 @@
 error:
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
 V3	K	#4
 V4	V3	#2
-A5	V4	arr
-A7	P	p
-A9	P	q
+A5	V4	"arr
+A7	P	"p
+A9	P	"q
 V10	I	#4
-A11	V10	v
+A11	V10	"v
 	A7	A5	'P	:P
 	A9	A5	'P	#P4	+P	#P3	+P	:P
 	A5	'P	#P4	+P	#P3	+P	@K	#K2	:K
--- a/cc1/tests/test019.c
+++ b/cc1/tests/test019.c
@@ -7,10 +7,10 @@
 test019.c:14: warning: division by 0
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	i
+A3	I	"i
 	A3	#I3	:I
 	A3	#I1	:I
 	A3	#I12	:I
--- a/cc1/tests/test020.c
+++ b/cc1/tests/test020.c
@@ -7,10 +7,10 @@
 test020.c:83: warning: division by 0
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	i
+A3	I	"i
 	A3	A3	#I0	!I	:I
 	A3	A3	#I0	!I	#I1	,I	:I
 	A3	#I1	:I
--- a/cc1/tests/test021.c
+++ b/cc1/tests/test021.c
@@ -6,11 +6,11 @@
 error:
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	K	uc
-A4	C	sc
+A3	K	"uc
+A4	C	"sc
 	A3	#KFF	:K
 	A3	#K23	:K
 	A3	#K1	:K
--- a/cc1/tests/test022.c
+++ b/cc1/tests/test022.c
@@ -6,11 +6,11 @@
 error:
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	i
-A4	N	u
+A3	I	"i
+A4	N	"u
 	A3	#I1	:I
 	A3	#IFFFF	:I
 	A3	#IFFFF	:I
--- a/cc1/tests/test023.c
+++ b/cc1/tests/test023.c
@@ -6,11 +6,11 @@
 error:
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	W	i
-A4	Z	u
+A3	W	"i
+A4	Z	"u
 	A3	#W1	:W
 	A3	#WFFFFFFFF	:W
 	A3	#WFFFFFFFF	:W
--- a/cc1/tests/test024.c
+++ b/cc1/tests/test024.c
@@ -6,11 +6,11 @@
 error:
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	Q	i
-A4	O	u
+A3	Q	"i
+A4	O	"u
 	A3	#Q1	:Q
 	A3	#QFFFFFFFFFFFFFFFF	:Q
 	A3	#QFFFFFFFFFFFFFFFF	:Q
--- a/cc1/tests/test025.c
+++ b/cc1/tests/test025.c
@@ -4,16 +4,16 @@
 descritpion: Test of ifdef and ifndef
 error:
 output:
-G1	I	a
-G2	I	b
-G3	I	c
-G4	I	d
-G5	I	_1
-G6	I	_2
-G7	I	e_
-G8	I	f_
-G9	I	h
-G10	I	i
+G1	I	"a
+G2	I	"b
+G3	I	"c
+G4	I	"d
+G5	I	"_1
+G6	I	"_2
+G7	I	"e_
+G8	I	"f_
+G9	I	"h
+G10	I	"i
 */
 
 #define FOO
--- a/cc1/tests/test026.c
+++ b/cc1/tests/test026.c
@@ -5,13 +5,13 @@
 error:
 output:
 F2	I
-G3	F2	main
+G3	F2	"main
 {
 \
-A4	I	y
-A6	P	p
+A4	I	"y
+A6	P	"p
 V8	K	#10
-Y7	V8
+Y7	V8	"
 (
 	#"test026.c
 	#K00
--- a/cc1/tests/test027.c
+++ b/cc1/tests/test027.c
@@ -5,12 +5,12 @@
 error:
 output:
 F2	I
-G3	F2	main
+G3	F2	"main
 {
 \
-A5	P	p
+A5	P	"p
 V7	K	#25
-Y6	V7
+Y6	V7	"
 (
 	#"hello is better than bye
 	#K00
--- a/cc1/tests/test028.c
+++ b/cc1/tests/test028.c
@@ -5,11 +5,11 @@
 error:
 output:
 F5	P
-G6	F5	foo
+G6	F5	"foo
 {
 \
 V8	K	#3
-Y10	V8
+Y10	V8	"
 (
 	#"hi
 	#K00
--- a/cc1/tests/test029.c
+++ b/cc1/tests/test029.c
@@ -10,10 +10,10 @@
 test029.c:36: error: 'f' undeclared
 output:
 F2	I
-G3	F2	f1
+G3	F2	"f1
 {
 \
-A4	I	f
+A4	I	"f
 	A4	#I2	*I
 }
 */
--- a/cc1/tests/test030.c
+++ b/cc1/tests/test030.c
@@ -5,17 +5,17 @@
 error:
 output:
 F13	I	S2	P	I	E
-G14	F13	f1
+G14	F13	"f1
 {
 S2	foo
-M3	I	i
-M4	I	j
-M5	I	k
-M7	P	p
-M8	J	v
-A9	S2	f
-A11	P	p
-A12	I	n
+M3	I	"i
+M4	I	"j
+M5	I	"k
+M7	P	"p
+M8	J	"v
+A9	S2	"f
+A11	P	"p
+A12	I	"n
 \
 	j	L15	A9	M3	.I	A11	@S2	M3	.I	=I
 	r	#I0
@@ -23,10 +23,10 @@
 	r	A11	@S2	M4	.I	A12	+I
 }
 F16	I
-G17	F16	main
+G17	F16	"main
 {
 \
-A18	S2	f
+A18	S2	"f
 	A18	M3	.I	A18	M4	.I	#I1	:I	:I
 	G14	A18	pS2	A18	'P	pP	#I2	pI	cI
 	G14	A18	pS2	A18	'P	pP	#I2	pI	#I1	pI	A18	pS2	A18	'P	pP	cI
--- a/cc1/tests/test032.c
+++ b/cc1/tests/test032.c
@@ -5,16 +5,16 @@
 error:
 output:
 F4	I
-G5	F4	main
+G5	F4	"main
 {
 \
 V9	K	#44
-Y8	V9
+Y8	V9	"
 (
 	#"This is a string $ or # or ##and it is ok !
 	#K00
 )
-A7	P	p
+A7	P	"p
 	A7	Y8	'P	:P
 	r	A7	#P0	!I
 }
--- a/cc1/tests/test033.c
+++ b/cc1/tests/test033.c
@@ -3,7 +3,7 @@
 description: test for #if defined()
 error:
 output:
-G1	I	c
+G1	I	"c
 */
 
 #if defined(FOO)
--- a/cc1/tests/test034.c
+++ b/cc1/tests/test034.c
@@ -6,22 +6,22 @@
 test034.c:46: error: declared variable 'bar' of incomplete type
 test034.c:46: error: redeclaration of 'bar'
 output:
-X3	S2	x
+X3	S2	"x
 F4	I	E
-X5	F4	foo
-G6	F4	main
+X5	F4	"foo
+G6	F4	"main
 {
 \
-X7	S2	x
+X7	S2	"x
 	r	X7	'P	#P0	!I
 }
-G5	F4	foo
+G5	F4	"foo
 {
 \
 	X3	M9	.I	#I0	:I
 	r	X3	M9	.I
 }
-X13	S11	bar2
+X13	S11	"bar2
 */
 
 extern struct X x;
--- a/cc1/tests/test035.c
+++ b/cc1/tests/test035.c
@@ -5,10 +5,10 @@
 error:
 output:
 F6	I	E
-G7	F6	main
+G7	F6	"main
 {
 \
-A8	I	e
+A8	I	"e
 	A8	#I3	:I
 	j	L9	A8	#I1	=I
 	r	#I0
--- a/cc1/tests/test036.c
+++ b/cc1/tests/test036.c
@@ -6,13 +6,13 @@
 test036.c:61: warning: type defaults to 'int' in declaration
 output:
 F4	I	E
-G5	F4	send
+G5	F4	"send
 {
-R1	P	to
-R2	P	from
-R3	I	count
+R1	P	"to
+R2	P	"from
+R3	I	"count
 \
-R7	I	n
+R7	I	"n
 	R7	R3	#I7	+I	#I8	/I	:I
 	s	L9	R3	#I8	%I
 L10
--- a/cc1/tests/test037.c
+++ b/cc1/tests/test037.c
@@ -9,7 +9,7 @@
 test037.c:34: warning: conditional expression is constant
 output:
 F1	I	E
-G2	F1	main
+G2	F1	"main
 {
 \
 	j	L3	#I0
--- a/cc1/tests/test038.c
+++ b/cc1/tests/test038.c
@@ -5,19 +5,19 @@
 error:
 test038.c:46: error: redeclaration of 'x'
 output:
-G1	I	x
+G1	I	"x
 (
 	#I0
 )
 F2	I	E
-X3	F2	main
+X3	F2	"main
 F4	P	E
-G5	F4	foo
+G5	F4	"foo
 {
 \
 	r	X3	'P
 }
-G3	F2	main
+G3	F2	"main
 {
 \
 	G1	#I0	:I
--- a/cc1/tests/test039.c
+++ b/cc1/tests/test039.c
@@ -6,15 +6,15 @@
 error:
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	i
-A4	N	u
-A5	W	l
-A6	Z	ul
-A7	Q	ll
-A8	O	ull
+A3	I	"i
+A4	N	"u
+A5	W	"l
+A6	Z	"ul
+A7	Q	"ll
+A8	O	"ull
 	A3	#I1	:I
 	A3	#I1	:I
 	A4	#N1	:N
--- a/cc1/tests/test040.c
+++ b/cc1/tests/test040.c
@@ -4,14 +4,14 @@
 error:
 output:
 F8	I
-G9	F8	main
+G9	F8	"main
 {
 \
 S2	List
-M4	I	len
-M6	P	head
-M7	P	back
-A10	S2	List
+M4	I	"len
+M6	P	"head
+M7	P	"back
+A10	S2	"List
 	r	A10	M4	.I
 }
 */
--- a/cc1/tests/test041.c
+++ b/cc1/tests/test041.c
@@ -10,16 +10,16 @@
 test041.c:51: warning: 's' defined but not used
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
-A3	I	i
-A5	P	q
-A7	P	s
-A8	P	p
+A3	I	"i
+A5	P	"q
+A7	P	"s
+A8	P	"p
 S10	foo
-M11	I	i
-A12	S10	foo
+M11	I	"i
+A12	S10	"foo
 	A3	A3	#I0	!I	#W0	#W0	?W	gI	:I
 	A8	A3	#I0	!I	#P0	#P0	?P	:P
 	A8	A3	#I0	!I	#P0	#P0	?P	:P
--- a/cc1/tests/test042.c
+++ b/cc1/tests/test042.c
@@ -5,11 +5,11 @@
 test042.c:20: error: bad type convertion requested
 output:
 F1	I
-G2	F1	main
+G2	F1	"main
 {
 \
 F3	0
-X4	F3	f
+X4	F3	"f
 */
 
 int
--- a/cc1/tests/test043.c
+++ b/cc1/tests/test043.c
@@ -5,11 +5,11 @@
 output:
 F4	0
 S2	Clock0link
-M6	P	clock
-M8	P	link
-G9	S2	cl0
+M6	P	"clock
+M8	P	"link
+G9	S2	"cl0
 F10	I
-G11	F10	main
+G11	F10	"main
 {
 \
 	G9	M6	.P	@F4	c0
--- a/cc1/tests/test045.c
+++ b/cc1/tests/test045.c
@@ -3,12 +3,12 @@
 description: Basic test of initializers
 error:
 output:
-G1	I	x
+G1	I	"x
 (
 	#I5
 )
 F2	I	E
-G3	F2	main
+G3	F2	"main
 {
 \
 	j	L4	G1	#I5	=I
--- a/cc1/tests/test046.c
+++ b/cc1/tests/test046.c
@@ -4,7 +4,7 @@
 error:
 output:
 V1	I	#3
-G2	V1	x
+G2	V1	"x
 (
 	#I1
 	#I2
@@ -11,7 +11,7 @@
 	#I3
 )
 F3	I	E
-G4	F3	main
+G4	F3	"main
 {
 \
 	j	L5	G2	#I1	=I
--- a/cc1/tests/test047.c
+++ b/cc1/tests/test047.c
@@ -4,10 +4,10 @@
 error:
 output:
 S2	S
-M3	I	a
-M4	I	b
-M5	I	c
-G6	S2	x
+M3	I	"a
+M4	I	"b
+M5	I	"c
+G6	S2	"x
 (
 	#I1
 	#I2
@@ -14,7 +14,7 @@
 	#I3
 )
 F7	I	E
-G8	F7	main
+G8	F7	"main
 {
 \
 	j	L9	G6	M3	.I	#I1	=I
--- a/cc1/tests/test048.c
+++ b/cc1/tests/test048.c
@@ -4,16 +4,16 @@
 error:
 output:
 S2	S
-M3	I	a
-M4	I	b
+M3	I	"a
+M4	I	"b
 V5	S2	#1
-G6	V5	x
+G6	V5	"x
 (
 	#I1
 	#I2
 )
 F7	I	E
-G8	F7	main
+G8	F7	"main
 {
 \
 	j	L9	G6	M3	.I	#I1	=I
--- a/cc1/tests/test049.c
+++ b/cc1/tests/test049.c
@@ -3,16 +3,16 @@
 description: Basic test for initializer
 error:
 output:
-G1	I	x
+G1	I	"x
 (
 	#I5
 )
-G3	P	p
+G3	P	"p
 (
 	G1	'P
 )
 F4	I	E
-G5	F4	main
+G5	F4	"main
 {
 \
 	j	L6	G3	@I	#I5	=I
--- a/cc1/tests/test051.c
+++ b/cc1/tests/test051.c
@@ -4,7 +4,7 @@
 error:
 output:
 V1	I	#3
-G2	V1	arr
+G2	V1	"arr
 (
 	#I0
 	#I1
@@ -11,7 +11,7 @@
 	#I2
 )
 F3	I	E
-G4	F3	main
+G4	F3	"main
 {
 \
 	j	L5	G2	#I0	=I
--- a/cc1/tests/test052.c
+++ b/cc1/tests/test052.c
@@ -4,10 +4,10 @@
 error:
 output:
 S2	S
-M3	I	a
-M4	I	b
+M3	I	"a
+M4	I	"b
 V5	S2	#2
-G6	V5	arr
+G6	V5	"arr
 (
 	#I1
 	#I2
@@ -15,7 +15,7 @@
 	#I4
 )
 F7	I	E
-G8	F7	main
+G8	F7	"main
 {
 \
 	j	L9	G6	M3	.I	#I1	=I
--- a/cc1/tests/test053.c
+++ b/cc1/tests/test053.c
@@ -4,15 +4,15 @@
 error:
 output:
 S2	S
-M3	I	a
-M4	I	b
-G5	S2	s
+M3	I	"a
+M4	I	"b
+G5	S2	"s
 (
 	#I1
 	#I2
 )
 F6	I	E
-G7	F6	main
+G7	F6	"main
 {
 \
 	j	L8	G5	M3	.I	#I1	=I
--- a/cc1/tests/test056.c
+++ b/cc1/tests/test056.c
@@ -5,12 +5,12 @@
 output:
 V6	K	#3
 S2	S
-M3	I	a
-M4	I	b
-M5	I	c
-M7	V6	d
-M8	I	e
-G9	S2	s
+M3	I	"a
+M4	I	"b
+M5	I	"c
+M7	V6	"d
+M8	I	"e
+G9	S2	"s
 (
 	#I1
 	#I2
@@ -21,11 +21,11 @@
 	#I0
 )
 V10	K	#0
-G11	V10	m
+G11	V10	"m
 (
 )
 F12	I
-G13	F12	main
+G13	F12	"main
 {
 \
 	r	G9	M7	.V6	'P	#P2	+P	@K	gI	gN	#N0	!I
--- a/cc1/tests/test057.c
+++ b/cc1/tests/test057.c
@@ -6,7 +6,7 @@
 output:
 V1	I	#3
 V2	V1	#2
-G3	V2	arr1
+G3	V2	"arr1
 (
 	#I2
 	#I7
@@ -15,7 +15,7 @@
 	#I1
 	#I2
 )
-G4	V2	arr2
+G4	V2	"arr2
 (
 	#I2
 	#I7
@@ -25,7 +25,7 @@
 	#I2
 )
 F5	I
-G6	F5	main
+G6	F5	"main
 {
 \
 	r	G3	'P	#P6	+P	#P4	+P	@I	G4	'P	#P6	+P	#P6	+P	@I	!I
--- a/cc1/tests/test058.c
+++ b/cc1/tests/test058.c
@@ -6,7 +6,7 @@
 V1	I	#5
 V2	V1	#3
 V3	V2	#2
-G4	V3	arr
+G4	V3	"arr
 (
 	#I0
 	#I0
@@ -40,7 +40,7 @@
 	#I0
 )
 F5	I
-G6	F5	main
+G6	F5	"main
 {
 \
 	r	G4	'P	#PA	+P	#P8	+P	@I	G4	'P	#P1E	+P	#PA	+P	#P8	+P	@I	!I
--- a/inc/cc.h
+++ b/inc/cc.h
@@ -40,6 +40,7 @@
 #define L_FIELD     'M'
 #define L_AUTO      'A'
 #define L_EXTERN    'X'
+#define L_NAME     '"'
 
 extern void die(const char *fmt, ...);
 extern void dbg(const char *fmt, ...);