summaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.c
diff options
context:
space:
mode:
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-25 08:28:45 +0000
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-25 08:28:45 +0000
commit396c36b792e9d25e5fd36903a8443b32687e66ca (patch)
treee1a569868b1d22b2f7d1fc6de2c5b6c7ef1e7b7e /gcc/c/c-decl.c
parent4c4946dbb8c7ca8090ff7d349294bfd7bcf2bc01 (diff)
downloadgcc-396c36b792e9d25e5fd36903a8443b32687e66ca.tar.gz
PR c/63877
* c-decl.c (start_function): Disable -Wmissing-declarations warning for inline functions. * gcc.dg/pr63877.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218039 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r--gcc/c/c-decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c
index 9288e2c1e8c..6413e6f8f35 100644
--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -8353,7 +8353,8 @@ start_function (struct c_declspecs *declspecs, struct c_declarator *declarator,
else if (warn_missing_declarations
&& TREE_PUBLIC (decl1)
&& old_decl == 0
- && !MAIN_NAME_P (DECL_NAME (decl1)))
+ && !MAIN_NAME_P (DECL_NAME (decl1))
+ && !DECL_DECLARED_INLINE_P (decl1))
warning_at (loc, OPT_Wmissing_declarations,
"no previous declaration for %qD",
decl1);