diff options
author | Jason Merrill <jason@redhat.com> | 2008-08-04 14:39:16 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2008-08-04 14:39:16 -0400 |
commit | 9b26c96e339b9e546ffe5ac2a114af397bf4cd17 (patch) | |
tree | 053116ba075582972aebfebdd7006475406bb701 /gcc/cp/pt.c | |
parent | 7eeef08ed83f2bd341dc420adc6402199ccbdd7d (diff) | |
download | gcc-9b26c96e339b9e546ffe5ac2a114af397bf4cd17.zip gcc-9b26c96e339b9e546ffe5ac2a114af397bf4cd17.tar.gz gcc-9b26c96e339b9e546ffe5ac2a114af397bf4cd17.tar.bz2 |
re PR c++/37006 (explicitly deleted inline function gives warning "used but never defined")
PR c++/37006
* pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
instantiations.
From-SVN: r138648
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 04fd29b..6e4f0ba 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -8143,7 +8143,9 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain) /* Clear out the mangled name and RTL for the instantiation. */ SET_DECL_ASSEMBLER_NAME (r, NULL_TREE); SET_DECL_RTL (r, NULL_RTX); - DECL_INITIAL (r) = NULL_TREE; + /* Leave DECL_INITIAL set on deleted instantiations. */ + if (!DECL_DELETED_FN (r)) + DECL_INITIAL (r) = NULL_TREE; DECL_CONTEXT (r) = ctx; if (member && DECL_CONV_FN_P (r)) |