PR c/63453
* c-decl.c (pop_scope): Don't warn about "inline function declared
but never defined" for functions marked with gnu_inline attribute.
* gcc.dg/pr63453.c: New test.
From-SVN: r215874
+2014-10-03 Marek Polacek <polacek@redhat.com>
+
+ PR c/63453
+ * c-decl.c (pop_scope): Don't warn about "inline function declared
+ but never defined" for functions marked with gnu_inline attribute.
+
2014-09-25 Jakub Jelinek <jakub@redhat.com>
PR c++/63249
/* C99 6.7.4p6: "a function with external linkage... declared
with an inline function specifier ... shall also be defined
in the same translation unit." */
- if (!flag_gnu89_inline)
+ if (!flag_gnu89_inline
+ && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (p)))
pedwarn (input_location, 0,
"inline function %q+D declared but never defined", p);
DECL_EXTERNAL (p) = 1;
+2014-10-03 Marek Polacek <polacek@redhat.com>
+
+ PR c/63453
+ * gcc.dg/pr63453.c: New test.
+
2014-10-03 Marc Glisse <marc.glisse@inria.fr>
PR c++/54427
--- /dev/null
+/* PR c/63453 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu11" } */
+
+inline int fn1 (void); /* { dg-warning "declared but never defined" } */
+extern inline int fn2 (void); /* { dg-warning "declared but never defined" } */
+inline int __attribute__ ((gnu_inline)) fn3 (void);
+extern inline int __attribute__ ((gnu_inline)) fn4 (void);