diff options
author | Marek Polacek <polacek@redhat.com> | 2014-10-23 16:46:44 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2014-10-23 16:46:44 +0000 |
commit | 1bc5a4513e09efd42f22ccbc25ff8cd7ec5619f5 (patch) | |
tree | fdeee113cb53fa81f984ce5e2e06f99d5f908461 /gcc/c/c-decl.c | |
parent | 59d7607aec61d173914f2af06097cd46d10d3504 (diff) | |
download | gcc-1bc5a4513e09efd42f22ccbc25ff8cd7ec5619f5.zip gcc-1bc5a4513e09efd42f22ccbc25ff8cd7ec5619f5.tar.gz gcc-1bc5a4513e09efd42f22ccbc25ff8cd7ec5619f5.tar.bz2 |
re PR c/63626 (Warning "inline function declared but never defined" output twice)
PR c/63626
* c-decl.c (pop_scope): Don't print warning in external_scope.
* gcc.dg/pr63626.c: New test.
From-SVN: r216595
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index b18da48..7d1840e 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -1182,7 +1182,8 @@ pop_scope (void) 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; |