non-existing entities must have peculiarity_description
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 27 May 2008 13:41:15 +0000 (13:41 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Tue, 27 May 2008 13:41:15 +0000 (13:41 +0000)
[r19795]

ast2firm.c

index b3b47dd..0d92919 100644 (file)
@@ -968,6 +968,11 @@ static ir_entity* get_function_entity(declaration_t *declaration)
        dbg_info  *const dbgi   = get_dbg_info(&declaration->source_position);
        ir_entity *const entity = new_d_entity(global_type, id, ir_type_method, dbgi);
        set_entity_ld_ident(entity, create_ld_ident(entity, declaration));
+       if(declaration->storage_class == STORAGE_CLASS_STATIC &&
+               declaration->init.statement == NULL) {
+               /* this entity was declared, but never defined */
+               set_entity_peculiarity(entity, peculiarity_description);
+       }
        if(declaration->storage_class == STORAGE_CLASS_STATIC
                        || declaration->is_inline) {
                set_entity_visibility(entity, visibility_local);