diff options
| author | Joe Soroka <gits@joesoroka.com> | 2011-03-08 15:19:54 -0800 |
|---|---|---|
| committer | Joe Soroka <gits@joesoroka.com> | 2011-03-08 15:19:54 -0800 |
| commit | 0b8aa909a39e75a6c6da0afedaa6c3ab70c6a0d0 (patch) | |
| tree | e549ae7d0186ff9bb838cbc23030f3fd507ed55f /tccgen.c | |
| parent | 9ff91d4c6f6bb20ea5e00d3676559edb6ab374eb (diff) | |
| download | tinycc-0b8aa909a39e75a6c6da0afedaa6c3ab70c6a0d0.tar.gz tinycc-0b8aa909a39e75a6c6da0afedaa6c3ab70c6a0d0.tar.bz2 | |
fix c99 for-loop init decl scope (thanks: grischka)
see http://lists.nongnu.org/archive/html/tinycc-devel/2011-03/msg00005.html
Diffstat (limited to 'tccgen.c')
| -rw-r--r-- | tccgen.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4384,6 +4384,7 @@ static void block(int *bsym, int *csym, int *case_sym, int *def_sym, int e; next(); skip('('); + s = local_stack; if (tok != ';') { /* c99 for-loop init decl? */ if (!decl0(VT_LOCAL, 1)) { @@ -4415,6 +4416,7 @@ static void block(int *bsym, int *csym, int *case_sym, int *def_sym, gjmp_addr(c); gsym(a); gsym_addr(b, c); + sym_pop(&local_stack, s); } else if (tok == TOK_DO) { next(); |
