- prints correctly computed goto
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sat, 13 Sep 2008 18:12:13 +0000 (18:12 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sat, 13 Sep 2008 18:12:13 +0000 (18:12 +0000)
- removed (old?) debugging output to stderr

[r21930]

ast.c

diff --git a/ast.c b/ast.c
index ed4e2b7..b05d096 100644 (file)
--- 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);
 }