fix cp_error020, fix warning
authorMatthias Braun <matze@braunis.de>
Thu, 14 Feb 2008 19:57:07 +0000 (19:57 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 14 Feb 2008 19:57:07 +0000 (19:57 +0000)
[r18860]

ast2firm.h
parser.c

index 93fb539..1a5d98f 100644 (file)
@@ -8,8 +8,4 @@ void translation_unit_to_firm(translation_unit_t *unit);
 void init_ast2firm(void);
 void exit_ast2firm(void);
 
-const char *dbg_retrieve(const dbg_info *dbg, unsigned *line);
-ir_node *uninitialized_local_var(ir_graph *irg, ir_mode *mode, int pos);
-unsigned dbg_snprint(char *buf, unsigned len, const dbg_info *dbg);
-
 #endif
index b85ac28..fa554d1 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1404,7 +1404,10 @@ static initializer_t *parse_sub_initializer(type_path_t *path,
                if(token.type == '}') {
                        break;
                }
+
                advance_current_object(path, top_path_level);
+               orig_type = path->top_type;
+               type      = skip_typeref(orig_type);
        }
 
        size_t len  = ARR_LEN(initializers);
@@ -1470,7 +1473,7 @@ static initializer_t *parse_initializer(type_t *const orig_type)
 
                expect('}');
        } else {
-               /* TODO ... */
+               panic("TODO");
        }
 
        return result;