PR c/63626
* c-decl.c (pop_scope): Don't print warning in external_scope.
* gcc.dg/pr63626.c: New test.
From-SVN: r216595
+2014-10-23 Marek Polacek <polacek@redhat.com>
+
+ PR c/63626
+ * c-decl.c (pop_scope): Don't print warning in external_scope.
+
2014-10-19 Marek Polacek <polacek@redhat.com>
PR c/63567
with an inline function specifier ... shall also be defined
in the same translation unit." */
if (!flag_gnu89_inline
- && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (p)))
+ && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (p))
+ && scope != external_scope)
pedwarn (input_location, 0,
"inline function %q+D declared but never defined", p);
DECL_EXTERNAL (p) = 1;
+2014-10-23 Marek Polacek <polacek@redhat.com>
+
+ PR c/63626
+ * gcc.dg/pr63626.c: New test.
+
2014-10-23 Marek Polacek <polacek@redhat.com>
* c-c++-common/ubsan/undefined-2.c: New test.
--- /dev/null
+/* PR c/63626 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+/* Test that we don't output the warning twice. */
+
+inline int foo (void); /* { dg-bogus "inline function.*inline function" } */
+/* { dg-warning "inline function .foo. declared but never defined" "" { target *-*-* } 7 } */