static int indent;
-/** If set, implicit casts are printed. */
bool print_implicit_casts = false;
-
-/** If set parenthesis are printed to indicate operator precedence. */
bool print_parenthesis = false;
static void print_statement(const statement_t *statement);
panic("invalid expression found (is constant expression)");
}
-/**
- * Initialize the AST construction.
- */
void init_ast(void)
{
obstack_init(&ast_obstack);
}
-/**
- * Free the AST.
- */
void exit_ast(void)
{
obstack_free(&ast_obstack, NULL);
}
-
-/**
- * Allocate an AST object of the given size.
- *
- * @param size the size of the object to allocate
- *
- * @return A new allocated object in the AST memeory space.
- */
-void *(allocate_ast)(size_t size)
-{
- return _allocate_ast(size);
-}
typedef struct translation_unit_t translation_unit_t;
-void init_ast(void);
-void exit_ast(void);
+/**
+ * Initialize the AST construction.
+ */
+void init_ast(void);
+
+/**
+ * Free the AST.
+ */
+void exit_ast(void);
-void print_expression(const expression_t *expression);
-void print_initializer(const initializer_t *initializer);
-void print_ast(const translation_unit_t *unit);
-void print_indent(void);
-void print_declaration(const entity_t *entity);
-void print_entity(const entity_t *entity);
-void change_indent(int delta);
-void *allocate_ast(size_t size);
+void print_expression(const expression_t *expression);
+void print_initializer(const initializer_t *initializer);
+void print_ast(const translation_unit_t *unit);
+void print_indent(void);
+void print_declaration(const entity_t *entity);
+void print_entity(const entity_t *entity);
+void change_indent(int delta);
typedef enum expression_classification_t {
EXPR_CLASS_VARIABLE,
statement_t *global_asm;
};
-static inline void *_allocate_ast(size_t size)
+static inline void *allocate_ast(size_t size)
{
return obstack_alloc(&ast_obstack, size);
}
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.
return res;
}
+/** 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
bool enable_main_collect2_hack = false;
bool freestanding = false;
-/* to switch on printing of implicit casts */
-extern bool print_implicit_casts;
-
-/* to switch on printing of parenthesis to indicate operator precedence */
-extern bool print_parenthesis;
-
static machine_triple_t *target_machine;
static const char *target_triple;
static int verbose;