C99: Declarations are not allowed as inner statements (they are no statements in...
[cparser] / ast_t.h
diff --git a/ast_t.h b/ast_t.h
index 15d8735..e05e633 100644 (file)
--- a/ast_t.h
+++ b/ast_t.h
@@ -667,11 +667,6 @@ struct translation_unit_t {
        statement_t *global_asm;
 };
 
-static inline void *_allocate_ast(size_t size)
-{
-       return obstack_alloc(&ast_obstack, size);
-}
-
 static inline bool is_invalid_expression(expression_t *expression)
 {
        return expression->base.kind == EXPR_INVALID;
@@ -682,17 +677,18 @@ static inline bool is_invalid_statement(statement_t *statement)
        return statement->base.kind == STATEMENT_INVALID;
 }
 
-#define allocate_ast(size)                 _allocate_ast(size)
-
 /**
  * Allocate an AST node with given size and
  * initialize all fields with zero.
  */
 static inline void *allocate_ast_zero(size_t size)
 {
-       void *res = allocate_ast(size);
-       memset(res, 0, size);
-       return res;
+       return memset(obstack_alloc(&ast_obstack, size), 0, size);
 }
 
+/** If set, implicit casts are printed. */
+extern bool print_implicit_casts;
+/** If set parenthesis are printed to indicate operator precedence. */
+extern bool print_parenthesis;
+
 #endif