projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
234eb98
)
Avoid double parentheses when AST printing sizeof expressions.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 21 Dec 2008 13:06:37 +0000
(13:06 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Sun, 21 Dec 2008 13:06:37 +0000
(13:06 +0000)
[r24826]
ast.c
patch
|
blob
|
history
diff --git
a/ast.c
b/ast.c
index
f0946ef
..
b893bd3
100644
(file)
--- a/
ast.c
+++ b/
ast.c
@@
-576,10
+576,8
@@
static void print_typeprop_expression(const typeprop_expression_t *expression)
fputs("__alignof__", out);
}
if (expression->tp_expression != NULL) {
- /* always print the '()' here, sizeof x is right but unusual */
- fputc('(', out);
- print_expression(expression->tp_expression);
- fputc(')', out);
+ /* PREC_TOP: always print the '()' here, sizeof x is right but unusual */
+ print_expression_prec(expression->tp_expression, PREC_TOP);
} else {
fputc('(', out);
print_type(expression->type);