diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-03-28 08:02:15 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-03-28 08:02:15 +0000 |
commit | 433cd9c9cb32d90aa5747bcc47d821ed8b8287b5 (patch) | |
tree | 2bd6f8682bc57160a3edc4599ba3ca083ea693ed /gcc/cp | |
parent | e81eb37fc88da5ea533bfb66e7755fc05f594bc3 (diff) | |
download | gcc-433cd9c9cb32d90aa5747bcc47d821ed8b8287b5.zip gcc-433cd9c9cb32d90aa5747bcc47d821ed8b8287b5.tar.gz gcc-433cd9c9cb32d90aa5747bcc47d821ed8b8287b5.tar.bz2 |
re PR c++/10047 (-fno-default-inline produces bogus warnings)
cp:
PR c++/10047
* decl2.c (finish_file): Don't warn about explicitly instantiated
inline decls.
testsuite:
PR c++/10047
* g++.dg/template/inline1.C: New test.
From-SVN: r64953
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c747679..888d4dc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-03-28 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/10047 + * decl2.c (finish_file): Don't warn about explicitly instantiated + inline decls. + 2003-03-27 Nathan Sidwell <nathan@codesourcery.com> PR c++/10224 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 9f5e27e..77b9636 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -2814,7 +2814,11 @@ finish_file () tree decl = VARRAY_TREE (deferred_fns, i); if (TREE_USED (decl) && DECL_DECLARED_INLINE_P (decl) - && !(TREE_ASM_WRITTEN (decl) || DECL_SAVED_TREE (decl))) + && !(TREE_ASM_WRITTEN (decl) || DECL_SAVED_TREE (decl) + /* An explicit instantiation can be used to specify + that the body is in another unit. It will have + already verified there was a definition. */ + || DECL_EXPLICIT_INSTANTIATION (decl))) { cp_warning_at ("inline function `%D' used but never defined", decl); /* This symbol is effectively an "extern" declaration now. |