From: Matthias Braun Date: Sat, 22 Mar 2008 12:17:59 +0000 (+0000) Subject: test commit X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=0709f476ea7bc26f606aacfda4675c44fbba4fc4;p=cparser test commit [r19010] --- diff --git a/TODO b/TODO index 2188f5b..bfd5452 100644 --- a/TODO +++ b/TODO @@ -12,7 +12,6 @@ Lexer: Parser: - disallow storage class specifiers in struct/union members -- label: declaration; is no valid C99 but we parse it anyway - add constant folding code (optional, ast2firm already does it) - Refactor code, so code to handle number values (and strings?) is an own module and replacable @@ -33,6 +32,7 @@ ast2firm: current unit) Missing Errors: +* label: declaration; is no valid C99 but we parse it anyway * check switches for double cases Missing Warnings: diff --git a/ast2firm.c b/ast2firm.c index aa98938..695b4cb 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -3248,6 +3248,20 @@ static ir_initializer_t *create_ir_initializer( panic("unknown initializer"); } +static void create_dynamic_null_initializer(ir_type *type, dbg_info *dbgi, + ir_node *base_addr) +{ + ir_mode *mode = get_type_mode(type); + tarval *zero = get_mode_null(mode); + ir_node *cnst = new_d_Const(dbgi, mode, zero); + + /* TODO: bitfields */ + ir_node *mem = get_store(); + ir_node *store = new_d_Store(dbgi, mem, base_addr, cnst); + ir_node *proj_m = new_Proj(store, mode_M, pn_Store_M); + set_store(proj_m); +} + static void create_dynamic_initializer_sub(ir_initializer_t *initializer, ir_type *type, dbg_info *dbgi, ir_node *base_addr) {