From 762876f19fa870401ae882515de1b58703b73ac4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 26 Jun 2006 05:42:05 +0000 Subject: [PATCH] (dump_free) For SBC_DBL_LIST, enclose the output code in curly braces, because it contains a variable declaration and might not be at the beginning of a block. --- src/language/lexer/ChangeLog | 6 ++++++ src/language/lexer/q2c.c | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/language/lexer/ChangeLog b/src/language/lexer/ChangeLog index 081aa8de..c1b5f984 100644 --- a/src/language/lexer/ChangeLog +++ b/src/language/lexer/ChangeLog @@ -1,3 +1,9 @@ +Sun Jun 25 22:41:00 2006 Ben Pfaff + + * q2c.c (dump_free): For SBC_DBL_LIST, enclose the output code in + curly braces, because it contains a variable declaration and might + not be at the beginning of a block. + Fri Jun 9 14:02:19 2006 Ben Pfaff Reform string library. diff --git a/src/language/lexer/q2c.c b/src/language/lexer/q2c.c index 2919bd5b..50a0856a 100644 --- a/src/language/lexer/q2c.c +++ b/src/language/lexer/q2c.c @@ -1931,9 +1931,11 @@ dump_free (int persistent) dump (0, "free (p->s_%s);", st_lower (sbc->name)); break; case SBC_DBL_LIST: - dump (0, "int i;"); - dump (1, "for(i = 0; i < MAXLISTS ; ++i)"); - dump (0, "subc_list_double_destroy(&p->dl_%s[i]);", st_lower (sbc->name)); + dump (0, "{"); + dump (1, "int i;"); + dump (2, "for(i = 0; i < MAXLISTS ; ++i)"); + dump (1, "subc_list_double_destroy(&p->dl_%s[i]);", st_lower (sbc->name)); + dump (0, "}"); outdent(); break; default: -- 2.30.2