aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1994-10-11 18:39:14 +0000
committerJason Merrill <merrill@gnu.org>1994-10-11 18:39:14 +0000
commit3536cd7e049cff68dfc38f6c660a0e88fe0c439c (patch)
treedb06e392d347a1cb60787e3e5cf0066ad1901319
parentb8bca6f2af3f5e5937b9b4bc72aee23dcc501d20 (diff)
downloadgcc-3536cd7e049cff68dfc38f6c660a0e88fe0c439c.zip
gcc-3536cd7e049cff68dfc38f6c660a0e88fe0c439c.tar.gz
gcc-3536cd7e049cff68dfc38f6c660a0e88fe0c439c.tar.bz2
(cons_up_default_function): Mark methods in a template class as template instances.
(cons_up_default_function): Mark methods in a template class as template instances. Store the values of interface_unknown and interface_only for do_pending_inlines. (do_pending_inlines): Use them. From-SVN: r8251
-rw-r--r--gcc/cp/lex.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 89286b5..deffa04 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -1123,6 +1123,8 @@ do_pending_inlines ()
{
tree f = t->fndecl;
DECL_PENDING_INLINE_INFO (f) = 0;
+ interface_unknown = t->interface == 1;
+ interface_only = t->interface == 0;
switch (- t->lineno)
{
case 0: case 1:
@@ -1147,7 +1149,10 @@ do_pending_inlines ()
tail = t;
}
if (bottom)
- obstack_free (&synth_obstack, bottom);
+ {
+ obstack_free (&synth_obstack, bottom);
+ extract_interface_info ();
+ }
t = prev;
}
@@ -1772,6 +1777,9 @@ cons_up_default_function (type, name, kind)
if (fn == void_type_node)
return fn;
+ if (CLASSTYPE_TEMPLATE_INSTANTIATION (type))
+ SET_DECL_IMPLICIT_INSTANTIATION (fn);
+
/* This kludge should go away when synthesized methods are handled
properly, i.e. only when needed. */
{
@@ -1780,6 +1788,7 @@ cons_up_default_function (type, name, kind)
obstack_alloc (&synth_obstack, sizeof (struct pending_inline));
t->lineno = -kind;
t->can_free = 0;
+ t->interface = (interface_unknown ? 1 : (interface_only ? 0 : 2));
store_pending_inline (fn, t);
}