aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--parse.c5
-rw-r--r--symbol.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/parse.c b/parse.c
index 16b56058..dff5a413 100644
--- a/parse.c
+++ b/parse.c
@@ -899,7 +899,8 @@ static struct token *external_declaration(struct token *token, struct symbol_lis
symbol_iterate(base_type->arguments, declare_argument, decl);
token = compound_statement(token->next, base_type->stmt);
end_function_scope();
- add_symbol(list, decl);
+ if (!(decl->ctype.modifiers & MOD_INLINE))
+ add_symbol(list, decl);
return expect(token, '}', "at end of function");
}
decl->ctype.modifiers |= MOD_EXTERN;
@@ -913,7 +914,7 @@ static struct token *external_declaration(struct token *token, struct symbol_lis
}
token = initializer(&decl->initializer, token->next);
}
- if (!is_typedef && !(decl->ctype.modifiers & MOD_EXTERN))
+ if (!is_typedef && !(decl->ctype.modifiers & (MOD_EXTERN | MOD_INLINE)))
add_symbol(list, decl);
if (!match_op(token, ','))
diff --git a/symbol.c b/symbol.c
index f1a0e6a9..9f380715 100644
--- a/symbol.c
+++ b/symbol.c
@@ -317,10 +317,11 @@ struct sym_init {
{ "union", NULL, MOD_UNIONOF },
{ "enum", NULL, MOD_ENUMOF },
- /* Ignored for now.. */
{ "inline", NULL, MOD_INLINE },
{ "__inline", NULL, MOD_INLINE },
{ "__inline__", NULL, MOD_INLINE },
+
+ /* Ignored for now.. */
{ "restrict", NULL, 0 },
{ "__restrict", NULL, 0 },