scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 009c13bcf646d01965d6e981ae4a67b3abab41ab
parent 4fca380b83f755487cd5e6c1f1b6cfc8c54674da
Author: Roberto E. Vargas Caballero <roberto.vargas@igrid-td.com>
Date:   Mon, 26 Sep 2016 11:20:18 +0200

[cc1] Fix definition of end of switch

Cc2 expects 't' for end of switch, but we were emiting 'k'.

Diffstat:
Mcc1/code.c | 2+-
Mcc1/tests/test012.c | 12++++++------
Mcc1/tests/test036.c | 2+-
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cc1/code.c b/cc1/code.c @@ -60,7 +60,7 @@ char *optxt[] = { [OLABEL] = "L%d\n", [ODEFAULT] = "\tf\tL%d\n", [OBSWITCH] = "\ts", - [OESWITCH] = "\tk\tL%d\n", + [OESWITCH] = "\tt\tL%d\n", [OCASE] = "\tv\tL%d", [OJUMP] = "\tj\tL%d\n", [OBRANCH] = "\ty\tL%d", diff --git a/cc1/tests/test012.c b/cc1/tests/test012.c @@ -14,7 +14,7 @@ A3 I "x s A3 v L5 #I0 L5 - k L4 + t L4 L4 s A3 v L7 #I0 @@ -26,9 +26,9 @@ L9 f L11 L11 h #I1 - k L8 + t L8 L8 - k L6 + t L6 L6 h #I2 L10 @@ -36,7 +36,7 @@ L10 v L13 #I1 L13 h #I3 - k L12 + t L12 L12 s A3 A3 #I2 :I @@ -44,7 +44,7 @@ L15 v L16 #I1 L16 h #I4 - k L14 + t L14 L14 s A3 v L18 #I0 @@ -56,7 +56,7 @@ L19 f L20 L20 h #I1 - k L17 + t L17 L17 } */ diff --git a/cc1/tests/test036.c b/cc1/tests/test036.c @@ -44,7 +44,7 @@ L18 y L10 R7 #I1 :-I #I0 >I b L11 - k L8 + t L8 L8 } */