[hackers] [scc] Use " to mark names of variables || Roberto E. Vargas Caballero
commit a1f4b88d0fd4e5d3b1b537f69db56fc282a2964f
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jan 22 15:37:28 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 22 17:14:39 2016 +0100
Use " to mark names of variables
This allow to lead the parser easier.
diff --git a/cc1/arch/i386/arch.h b/cc1/arch/i386/arch.h
index abe23b0..82d6e9b 100644
--- a/cc1/arch/i386/arch.h
+++ b/cc1/arch/i386/arch.h
_AT_@ -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
diff --git a/cc1/code.c b/cc1/code.c
index bab5dd8..93b9c0d 100644
--- a/cc1/code.c
+++ b/cc1/code.c
_AT_@ -300,7 +300,7 @@ emitstring(Symbol *sym, Type *tp)
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)
_AT_@ -386,8 +386,7 @@ emitdcl(unsigned op, void *arg)
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;
diff --git a/cc1/init.c b/cc1/init.c
index a2afc73..ad1fd28 100644
--- a/cc1/init.c
+++ b/cc1/init.c
_AT_@ -100,17 +100,17 @@ initialize(Type *tp)
Type *btp;
size_t len;
char *s;
+ int isstring;
if ((tp->op == ARY || tp->op == STRUCT) &&
yytoken != '{' && yytoken != STRING) {
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 &&
diff --git a/cc1/tests/test001.c b/cc1/tests/test001.c
index 6c775d4..b30d7e7 100644
--- a/cc1/tests/test001.c
+++ b/cc1/tests/test001.c
_AT_@ -4,13 +4,13 @@ description: Basic hello world test
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
diff --git a/cc1/tests/test002.c b/cc1/tests/test002.c
index af8be44..30fb45d 100644
--- a/cc1/tests/test002.c
+++ b/cc1/tests/test002.c
_AT_@ -3,17 +3,17 @@ name: TEST002
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 _AT_S2 A9 :S2
A11 #N0 :N A10 A9 'P :P ,P
diff --git a/cc1/tests/test003.c b/cc1/tests/test003.c
index 5342696..417bbe2 100644
--- a/cc1/tests/test003.c
+++ b/cc1/tests/test003.c
_AT_@ -4,17 +4,17 @@ description: Select function to call inside ternary operator
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
diff --git a/cc1/tests/test004.c b/cc1/tests/test004.c
index 639dc5d..e415467 100644
--- a/cc1/tests/test004.c
+++ b/cc1/tests/test004.c
_AT_@ -4,10 +4,10 @@ description: Test integer operations
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
diff --git a/cc1/tests/test005.c b/cc1/tests/test005.c
index 06d3e75..832c631 100644
--- a/cc1/tests/test005.c
+++ b/cc1/tests/test005.c
_AT_@ -4,10 +4,10 @@ description: Test unary integer operations
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
diff --git a/cc1/tests/test006.c b/cc1/tests/test006.c
index 152558f..f8b5839 100644
--- a/cc1/tests/test006.c
+++ b/cc1/tests/test006.c
_AT_@ -6,9 +6,9 @@ test006.c:6: warning: conditional expression is constant
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
diff --git a/cc1/tests/test007.c b/cc1/tests/test007.c
index 1a0787f..083d525 100644
--- a/cc1/tests/test007.c
+++ b/cc1/tests/test007.c
_AT_@ -4,10 +4,10 @@ description: basic while test
error:
output:
F1 I E
-G2 F1 main
+G2 F1 "main
{
\
-A3 I x
+A3 I "x
A3 #IA :I
j L6
e
diff --git a/cc1/tests/test008.c b/cc1/tests/test008.c
index 10073ab..4dd8de9 100644
--- a/cc1/tests/test008.c
+++ b/cc1/tests/test008.c
_AT_@ -4,10 +4,10 @@ description: Basic do while loop
error:
output:
F1 I E
-G2 F1 main
+G2 F1 "main
{
\
-A3 I x
+A3 I "x
A3 #I0 :I
e
L4
diff --git a/cc1/tests/test009.c b/cc1/tests/test009.c
index 0a20c8f..5cae579 100644
--- a/cc1/tests/test009.c
+++ b/cc1/tests/test009.c
_AT_@ -4,10 +4,10 @@ description: Basic test for loops
error:
output:
F1 I E
-G2 F1 main
+G2 F1 "main
{
\
-A3 I x
+A3 I "x
A3 #I0 :I
j L6
e
diff --git a/cc1/tests/test010.c b/cc1/tests/test010.c
index febffd7..5be2ece 100644
--- a/cc1/tests/test010.c
+++ b/cc1/tests/test010.c
_AT_@ -7,10 +7,10 @@ test010.c:11: warning: conditional expression is constant
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
diff --git a/cc1/tests/test011.c b/cc1/tests/test011.c
index fde04a8..079deb3 100644
--- a/cc1/tests/test011.c
+++ b/cc1/tests/test011.c
_AT_@ -6,7 +6,7 @@ test011.c:14: warning: 'foo' defined but not used
test011.c:14: warning: 'start' defined but not used
output:
F1 I E
-G2 F1 main
+G2 F1 "main
{
\
L3
diff --git a/cc1/tests/test012.c b/cc1/tests/test012.c
index 69cce16..8bcafd3 100644
--- a/cc1/tests/test012.c
+++ b/cc1/tests/test012.c
_AT_@ -5,10 +5,10 @@ error:
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
diff --git a/cc1/tests/test013.c b/cc1/tests/test013.c
index da69126..a84ae7c 100644
--- a/cc1/tests/test013.c
+++ b/cc1/tests/test013.c
_AT_@ -6,19 +6,19 @@ comments: This test depends of the configuration in the type system.
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
diff --git a/cc1/tests/test014.c b/cc1/tests/test014.c
index 51bb58b..9c34753 100644
--- a/cc1/tests/test014.c
+++ b/cc1/tests/test014.c
_AT_@ -19,30 +19,30 @@ test014.c:35: warning: 'f' defined but not used
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
\
}
*/
diff --git a/cc1/tests/test015.c b/cc1/tests/test015.c
index 982587c..9cfc1e8 100644
--- a/cc1/tests/test015.c
+++ b/cc1/tests/test015.c
_AT_@ -5,20 +5,20 @@ error:
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
diff --git a/cc1/tests/test016.c b/cc1/tests/test016.c
index 601fb25..d0ecffd 100644
--- a/cc1/tests/test016.c
+++ b/cc1/tests/test016.c
_AT_@ -5,13 +5,13 @@ error:
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
_AT_@ -26,12 +26,12 @@ L7
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
diff --git a/cc1/tests/test017.c b/cc1/tests/test017.c
index ccf5242..1e28eed 100644
--- a/cc1/tests/test017.c
+++ b/cc1/tests/test017.c
_AT_@ -4,16 +4,16 @@ description: Basic test about pointers and structs
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 _AT_S2 M3 .I #I1 :I
A12 M8 .P _AT_S2 M4 .I #I2 :I
diff --git a/cc1/tests/test018.c b/cc1/tests/test018.c
index 397f448..618a8b2 100644
--- a/cc1/tests/test018.c
+++ b/cc1/tests/test018.c
_AT_@ -4,16 +4,16 @@ description: Basic test for arrays
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 _AT_K #K2 :K
diff --git a/cc1/tests/test019.c b/cc1/tests/test019.c
index 67fd7bd..e1f669e 100644
--- a/cc1/tests/test019.c
+++ b/cc1/tests/test019.c
_AT_@ -7,10 +7,10 @@ test019.c:13: warning: division by 0
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
diff --git a/cc1/tests/test020.c b/cc1/tests/test020.c
index daaf46e..18b8c2c 100644
--- a/cc1/tests/test020.c
+++ b/cc1/tests/test020.c
_AT_@ -7,10 +7,10 @@ test020.c:82: warning: division by 0
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
diff --git a/cc1/tests/test021.c b/cc1/tests/test021.c
index cb80a84..c0b173b 100644
--- a/cc1/tests/test021.c
+++ b/cc1/tests/test021.c
_AT_@ -6,11 +6,11 @@ comments: This test is done for z80 implementation
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
diff --git a/cc1/tests/test022.c b/cc1/tests/test022.c
index 3c6550e..bdfdab4 100644
--- a/cc1/tests/test022.c
+++ b/cc1/tests/test022.c
_AT_@ -6,11 +6,11 @@ comments: This test is done for z80 data types
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
diff --git a/cc1/tests/test023.c b/cc1/tests/test023.c
index 8781dd5..ac9d894 100644
--- a/cc1/tests/test023.c
+++ b/cc1/tests/test023.c
_AT_@ -6,11 +6,11 @@ comments: This test is done for z80 data types
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
diff --git a/cc1/tests/test024.c b/cc1/tests/test024.c
index f1b769f..05ec391 100644
--- a/cc1/tests/test024.c
+++ b/cc1/tests/test024.c
_AT_@ -6,11 +6,11 @@ comments: This test is done for z80 data types
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
diff --git a/cc1/tests/test025.c b/cc1/tests/test025.c
index 22c4913..34f6c4c 100644
--- a/cc1/tests/test025.c
+++ b/cc1/tests/test025.c
_AT_@ -4,16 +4,16 @@ name: TEST025
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
diff --git a/cc1/tests/test026.c b/cc1/tests/test026.c
index 100092d..2abf236 100644
--- a/cc1/tests/test026.c
+++ b/cc1/tests/test026.c
_AT_@ -5,13 +5,13 @@ descritpion: Test of predefined cpp macros
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
diff --git a/cc1/tests/test027.c b/cc1/tests/test027.c
index da62d41..13ed578 100644
--- a/cc1/tests/test027.c
+++ b/cc1/tests/test027.c
_AT_@ -5,12 +5,12 @@ description: Test of cpp stringizer
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
diff --git a/cc1/tests/test028.c b/cc1/tests/test028.c
index 74e0278..70c646f 100644
--- a/cc1/tests/test028.c
+++ b/cc1/tests/test028.c
_AT_@ -5,11 +5,11 @@ description: Test of reinterpretation in define
error:
output:
F5 P
-G6 F5 foo
+G6 F5 "foo
{
\
V8 K #3
-Y10 V8
+Y10 V8 "
(
#"hi
#K00
diff --git a/cc1/tests/test029.c b/cc1/tests/test029.c
index 764de9e..d34f74d 100644
--- a/cc1/tests/test029.c
+++ b/cc1/tests/test029.c
_AT_@ -10,10 +10,10 @@ test029.c:35: error: redefinition of 'f1'
test029.c:36: error: 'f' undeclared
output:
F2 I
-G3 F2 f1
+G3 F2 "f1
{
\
-A4 I f
+A4 I "f
A4 #I2 *I
}
*/
diff --git a/cc1/tests/test030.c b/cc1/tests/test030.c
index 53dbad1..4a2cb37 100644
--- a/cc1/tests/test030.c
+++ b/cc1/tests/test030.c
_AT_@ -5,17 +5,17 @@ description: Basic test for vararg functions
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 _AT_S2 M3 .I =I
r #I0
_AT_@ -23,10 +23,10 @@ L15
r A11 _AT_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
diff --git a/cc1/tests/test032.c b/cc1/tests/test032.c
index ae9da0a..321227d 100644
--- a/cc1/tests/test032.c
+++ b/cc1/tests/test032.c
_AT_@ -5,16 +5,16 @@ description: test special characters @ and $ in macro definitions
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
}
diff --git a/cc1/tests/test033.c b/cc1/tests/test033.c
index a75270e..82a9be3 100644
--- a/cc1/tests/test033.c
+++ b/cc1/tests/test033.c
_AT_@ -3,7 +3,7 @@ name: TEST033
description: test for #if defined()
error:
output:
-G1 I c
+G1 I "c
*/
#if defined(FOO)
diff --git a/cc1/tests/test034.c b/cc1/tests/test034.c
index 2cf96b5..f10d2ee 100644
--- a/cc1/tests/test034.c
+++ b/cc1/tests/test034.c
_AT_@ -6,22 +6,22 @@ error:
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;
diff --git a/cc1/tests/test035.c b/cc1/tests/test035.c
index 14a4cfe..20db03c 100644
--- a/cc1/tests/test035.c
+++ b/cc1/tests/test035.c
_AT_@ -5,10 +5,10 @@ description: Basic test for enumerations
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
diff --git a/cc1/tests/test036.c b/cc1/tests/test036.c
index 79d8690..b7d6fcc 100644
--- a/cc1/tests/test036.c
+++ b/cc1/tests/test036.c
_AT_@ -6,13 +6,13 @@ error:
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
diff --git a/cc1/tests/test037.c b/cc1/tests/test037.c
index 0549473..52abb97 100644
--- a/cc1/tests/test037.c
+++ b/cc1/tests/test037.c
_AT_@ -9,7 +9,7 @@ test037.c:32: warning: conditional expression is constant
test037.c:34: warning: conditional expression is constant
output:
F1 I E
-G2 F1 main
+G2 F1 "main
{
\
j L3 #I0
diff --git a/cc1/tests/test038.c b/cc1/tests/test038.c
index be4c069..b037b96 100644
--- a/cc1/tests/test038.c
+++ b/cc1/tests/test038.c
_AT_@ -5,19 +5,19 @@ description: Basic test for tentative definitions
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
diff --git a/cc1/tests/test039.c b/cc1/tests/test039.c
index 88c639f..5c6fcc4 100644
--- a/cc1/tests/test039.c
+++ b/cc1/tests/test039.c
_AT_@ -6,15 +6,15 @@ comments: This test is done for z80 sizes
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
diff --git a/cc1/tests/test040.c b/cc1/tests/test040.c
index 1ca5028..0b2a773 100644
--- a/cc1/tests/test040.c
+++ b/cc1/tests/test040.c
_AT_@ -4,14 +4,14 @@ description: Test for bug parsing typenames in struct definition
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
}
*/
diff --git a/cc1/tests/test041.c b/cc1/tests/test041.c
index 6d0327f..4d2ebc6 100644
--- a/cc1/tests/test041.c
+++ b/cc1/tests/test041.c
_AT_@ -10,16 +10,16 @@ test041.c:51: warning: 'foo' defined but not used
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
diff --git a/cc1/tests/test042.c b/cc1/tests/test042.c
index d4fe72b..1fc061e 100644
--- a/cc1/tests/test042.c
+++ b/cc1/tests/test042.c
_AT_@ -5,11 +5,11 @@ error:
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
diff --git a/cc1/tests/test043.c b/cc1/tests/test043.c
index f7b32b3..5f035a4 100644
--- a/cc1/tests/test043.c
+++ b/cc1/tests/test043.c
_AT_@ -5,11 +5,11 @@ error:
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 _AT_F4 c0
diff --git a/cc1/tests/test045.c b/cc1/tests/test045.c
index 80e8c60..9ba086e 100644
--- a/cc1/tests/test045.c
+++ b/cc1/tests/test045.c
_AT_@ -3,12 +3,12 @@ name: TEST045
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
diff --git a/cc1/tests/test046.c b/cc1/tests/test046.c
index 33ce0b3..91af100 100644
--- a/cc1/tests/test046.c
+++ b/cc1/tests/test046.c
_AT_@ -4,14 +4,14 @@ description: Basic test for initializators
error:
output:
V1 I #3
-G2 V1 x
+G2 V1 "x
(
#I1
#I2
#I3
)
F3 I E
-G4 F3 main
+G4 F3 "main
{
\
j L5 G2 #I1 =I
diff --git a/cc1/tests/test047.c b/cc1/tests/test047.c
index c0a1d39..2487d6b 100644
--- a/cc1/tests/test047.c
+++ b/cc1/tests/test047.c
_AT_@ -4,17 +4,17 @@ description: Basic test for initializer
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
#I3
)
F7 I E
-G8 F7 main
+G8 F7 "main
{
\
j L9 G6 M3 .I #I1 =I
diff --git a/cc1/tests/test048.c b/cc1/tests/test048.c
index 19c62a9..8f916f1 100644
--- a/cc1/tests/test048.c
+++ b/cc1/tests/test048.c
_AT_@ -4,16 +4,16 @@ description: Basic test for initializer
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
diff --git a/cc1/tests/test049.c b/cc1/tests/test049.c
index fdf0ef8..1492922 100644
--- a/cc1/tests/test049.c
+++ b/cc1/tests/test049.c
_AT_@ -3,16 +3,16 @@ name: TEST049
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 _AT_I #I5 =I
diff --git a/cc1/tests/test051.c b/cc1/tests/test051.c
index e9249e2..a6aab39 100644
--- a/cc1/tests/test051.c
+++ b/cc1/tests/test051.c
_AT_@ -4,14 +4,14 @@ description: Basic test for initializer
error:
output:
V1 I #3
-G2 V1 arr
+G2 V1 "arr
(
#I0
#I1
#I2
)
F3 I E
-G4 F3 main
+G4 F3 "main
{
\
j L5 G2 #I0 =I
diff --git a/cc1/tests/test052.c b/cc1/tests/test052.c
index 6038645..ec887eb 100644
--- a/cc1/tests/test052.c
+++ b/cc1/tests/test052.c
_AT_@ -4,10 +4,10 @@ description: Basic test for initializer
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
_AT_@ -15,7 +15,7 @@ G6 V5 arr
#I4
)
F7 I E
-G8 F7 main
+G8 F7 "main
{
\
j L9 G6 M3 .I #I1 =I
diff --git a/cc1/tests/test053.c b/cc1/tests/test053.c
index 7ac96d4..6c11ee8 100644
--- a/cc1/tests/test053.c
+++ b/cc1/tests/test053.c
_AT_@ -4,15 +4,15 @@ description: Basic test for initializer
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
diff --git a/cc1/tests/test056.c b/cc1/tests/test056.c
index b8d7524..1dfb7bb 100644
--- a/cc1/tests/test056.c
+++ b/cc1/tests/test056.c
_AT_@ -5,12 +5,12 @@ error:
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
_AT_@ -21,11 +21,11 @@ G9 S2 s
#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 _AT_K gI gN #N0 !I
diff --git a/cc1/tests/test057.c b/cc1/tests/test057.c
index 4a5f0c2..39a35d4 100644
--- a/cc1/tests/test057.c
+++ b/cc1/tests/test057.c
_AT_@ -6,7 +6,7 @@ error:
output:
V1 I #3
V2 V1 #2
-G3 V2 arr1
+G3 V2 "arr1
(
#I2
#I7
_AT_@ -15,7 +15,7 @@ G3 V2 arr1
#I1
#I2
)
-G4 V2 arr2
+G4 V2 "arr2
(
#I2
#I7
_AT_@ -25,7 +25,7 @@ G4 V2 arr2
#I2
)
F5 I
-G6 F5 main
+G6 F5 "main
{
\
r G3 'P #P6 +P #P4 +P _AT_I G4 'P #P6 +P #P6 +P @I !I
diff --git a/cc1/tests/test058.c b/cc1/tests/test058.c
index bdfc8b1..d953858 100644
--- a/cc1/tests/test058.c
+++ b/cc1/tests/test058.c
_AT_@ -6,7 +6,7 @@ output:
V1 I #5
V2 V1 #3
V3 V2 #2
-G4 V3 arr
+G4 V3 "arr
(
#I0
#I0
_AT_@ -40,7 +40,7 @@ G4 V3 arr
#I0
)
F5 I
-G6 F5 main
+G6 F5 "main
{
\
r G4 'P #PA +P #P8 +P _AT_I G4 'P #P1E +P #PA +P #P8 +P @I !I
diff --git a/inc/cc.h b/inc/cc.h
index 7833df5..72afb4c 100644
--- a/inc/cc.h
+++ b/inc/cc.h
_AT_@ -40,6 +40,7 @@ extern int debug;
#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, ...);
Received on Fri Jan 22 2016 - 18:40:59 CET
This archive was generated by hypermail 2.3.0
: Fri Jan 22 2016 - 18:48:14 CET