Correct precedence of postfix ++ and -- in the AST-printer.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 19 Nov 2008 22:25:52 +0000 (22:25 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 19 Nov 2008 22:25:52 +0000 (22:25 +0000)
[r23837]

ast.c

diff --git a/ast.c b/ast.c
index 7f7ed73..cfec103 100644 (file)
--- a/ast.c
+++ b/ast.c
@@ -126,8 +126,8 @@ static unsigned get_expression_precedence(expression_kind_t kind)
                [EXPR_UNARY_NOT]                 = PREC_UNARY,
                [EXPR_UNARY_DEREFERENCE]         = PREC_UNARY,
                [EXPR_UNARY_TAKE_ADDRESS]        = PREC_UNARY,
-               [EXPR_UNARY_POSTFIX_INCREMENT]   = PREC_UNARY,
-               [EXPR_UNARY_POSTFIX_DECREMENT]   = PREC_UNARY,
+               [EXPR_UNARY_POSTFIX_INCREMENT]   = PREC_POSTFIX,
+               [EXPR_UNARY_POSTFIX_DECREMENT]   = PREC_POSTFIX,
                [EXPR_UNARY_PREFIX_INCREMENT]    = PREC_UNARY,
                [EXPR_UNARY_PREFIX_DECREMENT]    = PREC_UNARY,
                [EXPR_UNARY_CAST]                = PREC_UNARY,