scc

Simple C99 Compiler
Log | Files | Refs | README | LICENSE

commit 1770b6f83b89855a47d3457c2a1c24127d033d43
parent 537e20492045bd44e48e57d5c664c9eccf0a5a06
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 24 Apr 2014 09:11:44 +0200

Emit end label in while and for loops

This label marks the end of a loop (it is used for break statements),
but in For() and While() was not emited.

Diffstat:
stmt.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/stmt.c b/stmt.c @@ -57,6 +57,7 @@ While(Symbol *lswitch) emitlabel(cond); emitjump(begin, np); emiteloop(); + emitlabel(end); } static void @@ -85,6 +86,7 @@ For(Symbol *lswitch) emitlabel(cond); emitjump(begin, econd); emiteloop(); + emitlabel(end); } static void