Allow perverted case: Be lenient when a function is declared inline, but there is...
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 7 Aug 2008 15:25:25 +0000 (15:25 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 7 Aug 2008 15:25:25 +0000 (15:25 +0000)
[r21053]

ast2firm.c

index 7a0ca4d..1b34c2c 100644 (file)
@@ -1021,7 +1021,8 @@ static ir_entity *get_function_entity(declaration_t *declaration)
        bool                const has_body      = declaration->init.statement != NULL;
        if (is_inline && storage_class == STORAGE_CLASS_NONE && has_body) {
                set_entity_visibility(entity, visibility_external_visible);
-       } else if (storage_class == STORAGE_CLASS_STATIC || is_inline) {
+       } else if (storage_class == STORAGE_CLASS_STATIC ||
+                  (is_inline && has_body)) {
                if (!has_body) {
                        /* this entity was declared, but is defined nowhere */
                        set_entity_peculiarity(entity, peculiarity_description);