Commit b286be94 by Marek Polacek Committed by Marek Polacek

re PR c/63877 (- -Wmissing-declarations produces false alarms for C99 inline functions)

	PR c/63877
	* c-decl.c (start_function): Disable -Wmissing-declarations warning
	for inline functions.

	* gcc.dg/pr63877.c: New test.

From-SVN: r218039
parent a5b58b28
2014-11-25 Marek Polacek <polacek@redhat.com>
PR c/63877
* c-decl.c (start_function): Disable -Wmissing-declarations warning
for inline functions.
2014-11-21 Jakub Jelinek <jakub@redhat.com>
PR target/63764
......
......@@ -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);
......
2014-11-25 Marek Polacek <polacek@redhat.com>
PR c/63877
* gcc.dg/pr63877.c: New test.
2014-11-25 Markus Trippelsdorf <markus@trippelsdorf.de>
PR ipa/64059
......
/* { dg-do compile } */
/* { dg-options "-Wmissing-declarations" } */
inline int foo (void) { return 42; } /* { dg-bogus "no previous declaration" } */
extern int foo (void);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment