test commit
authorMatthias Braun <matze@braunis.de>
Sat, 22 Mar 2008 12:17:59 +0000 (12:17 +0000)
committerMatthias Braun <matze@braunis.de>
Sat, 22 Mar 2008 12:17:59 +0000 (12:17 +0000)
[r19010]

TODO
ast2firm.c

diff --git a/TODO b/TODO
index 2188f5b..bfd5452 100644 (file)
--- 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:
index aa98938..695b4cb 100644 (file)
@@ -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)
 {