From beb2c09102031fa8ecafbdebf537e820a4aa0210 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 7 Aug 2008 15:25:25 +0000 Subject: [PATCH] Allow perverted case: Be lenient when a function is declared inline, but there is not body in the translation unit. [r21053] --- ast2firm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ast2firm.c b/ast2firm.c index 7a0ca4d..1b34c2c 100644 --- a/ast2firm.c +++ b/ast2firm.c @@ -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); -- 2.20.1