From edd280545f0391d97d194d914c4b99ff7cbb17b7 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 4 Dec 2013 21:15:31 +0000 Subject: re PR c/54113 (-Wmissing-prototypes produces false alarms for C99 inline functions) PR c/54113 c/ * c-decl.c (start_function): Don't warn for missing prototype for inline functions. testsuite/ * gcc.dg/pr54113.c: New test. From-SVN: r205680 --- gcc/c/c-decl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/c/c-decl.c') diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 3ebc002..3dbe9cb 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -7974,7 +7974,8 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator, && old_decl != error_mark_node && TREE_PUBLIC (decl1) && !MAIN_NAME_P (DECL_NAME (decl1)) - && C_DECL_ISNT_PROTOTYPE (old_decl)) + && C_DECL_ISNT_PROTOTYPE (old_decl) + && !DECL_DECLARED_INLINE_P (decl1)) warning_at (loc, OPT_Wmissing_prototypes, "no previous prototype for %qD", decl1); /* Optionally warn of any def with no previous prototype -- cgit v1.1