Remove the unnecessary attribute symbol from struct select_expression_t.
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 12 Sep 2008 19:46:47 +0000 (19:46 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 12 Sep 2008 19:46:47 +0000 (19:46 +0000)
[r21907]

ast.c
ast_t.h
parser.c

diff --git a/ast.c b/ast.c
index 3e7f862..ed4e2b7 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -670,7 +670,7 @@ static void print_select(const select_expression_t *expression)
        } else {
                fputc('.', out);
        }
-       fputs(expression->symbol->string, out);
+       fputs(expression->compound_entry->symbol->string, out);
 }
 
 /**
diff --git a/ast_t.h b/ast_t.h
index ac7919b..d014754 100644 (file)
--- a/ast_t.h
+++ b/ast_t.h
@@ -280,8 +280,6 @@ struct binary_expression_t {
 struct select_expression_t {
        expression_base_t  base;
        expression_t      *compound;
-       symbol_t          *symbol;
-
        declaration_t     *compound_entry;
 };
 
index aca7c93..89ebf71 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -6733,8 +6733,7 @@ static expression_t *parse_select_expression(unsigned precedence,
                parse_error_expected("while parsing select", T_IDENTIFIER, NULL);
                return select;
        }
-       symbol_t *symbol      = token.v.symbol;
-       select->select.symbol = symbol;
+       symbol_t *symbol = token.v.symbol;
        next_token();
 
        type_t *const orig_type = compound->base.type;