From: Michael Beck Date: Sat, 13 Sep 2008 18:12:13 +0000 (+0000) Subject: - prints correctly computed goto X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=1bb629121d50d973f419fa9c91056f7e73a8eccc;p=cparser - prints correctly computed goto - removed (old?) debugging output to stderr [r21930] --- diff --git a/ast.c b/ast.c index ed4e2b7..b05d096 100644 --- a/ast.c +++ b/ast.c @@ -889,8 +889,12 @@ static void print_expression_statement(const expression_statement_t *statement) static void print_goto_statement(const goto_statement_t *statement) { fprintf(out, "goto "); - fputs(statement->label->symbol->string, out); - fprintf(stderr, "(%p)", (void*) statement->label); + if (statement->expression != NULL) { + fputc('*', out); + print_expression(statement->expression); + } else { + fputs(statement->label->symbol->string, out); + } fputs(";\n", out); } @@ -901,7 +905,6 @@ static void print_goto_statement(const goto_statement_t *statement) */ static void print_label_statement(const label_statement_t *statement) { - fprintf(stderr, "(%p)", (void*) statement->label); fprintf(out, "%s:\n", statement->label->symbol->string); print_statement(statement->statement); }