aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-decl.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2013-12-04 21:15:31 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2013-12-04 21:15:31 +0000
commitedd280545f0391d97d194d914c4b99ff7cbb17b7 (patch)
treef95d3feb09691ba85bf7afa4d559e416f3809d38 /gcc/c/c-decl.c
parent5f673c6a1c5c18e8a7671d6b2ac130f637d9b23e (diff)
downloadgcc-edd280545f0391d97d194d914c4b99ff7cbb17b7.zip
gcc-edd280545f0391d97d194d914c4b99ff7cbb17b7.tar.gz
gcc-edd280545f0391d97d194d914c4b99ff7cbb17b7.tar.bz2
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
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 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