aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r--gcc/cp/decl2.c6
1 files changed, 5 insertions, 1 deletions
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.