* decl.c (duplicate_decls): Don't warn about template instances.
* typeck.c (mark_addressable): Lose ancient code that unsets
DECL_EXTERNAL.
* pt.c (do_decl_instantiation): Lose support for instantiating
non-templates.
* call.c (build_new_function_call): Fix handling of null explicit
template args.
(build_new_method_call): Likewise.
Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
* method.c (build_underscore_int): Fix typo.
From-SVN: r15851
+Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (duplicate_decls): Don't warn about template instances.
+
+ * typeck.c (mark_addressable): Lose ancient code that unsets
+ DECL_EXTERNAL.
+
+ * pt.c (do_decl_instantiation): Lose support for instantiating
+ non-templates.
+
+ * call.c (build_new_function_call): Fix handling of null explicit
+ template args.
+ (build_new_method_call): Likewise.
+
+Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
+
+ * method.c (build_underscore_int): Fix typo.
+
1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
* tree.c (print_lang_statistics): #if 0 call to
Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
+ * decl2.c (finish_file): Move dump_tree_statistics to end.
+
* pt.c (instantiate_decl): Look for the original template.
(tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
of member templates.
{
struct z_candidate *candidates = 0, *cand;
tree explicit_targs = NULL_TREE;
+ int template_only = 0;
if (TREE_CODE (fn) == TEMPLATE_ID_EXPR)
{
explicit_targs = TREE_OPERAND (fn, 1);
fn = TREE_OPERAND (fn, 0);
+ template_only = 1;
}
if (obj == NULL_TREE && really_overloaded_fn (fn))
(candidates, t, explicit_targs, args, NULL_TREE,
LOOKUP_NORMAL);
}
- else if (explicit_targs == NULL_TREE)
+ else if (! template_only)
candidates = add_function_candidate
(candidates, t, args, LOOKUP_NORMAL);
}
tree pretty_name;
tree user_args = args;
tree templates = NULL_TREE;
+ int template_only = 0;
if (TREE_CODE (name) == TEMPLATE_ID_EXPR)
{
explicit_targs = TREE_OPERAND (name, 1);
name = TREE_OPERAND (name, 0);
+ template_only = 1;
}
/* If there is an extra argument for controlling virtual bases,
TREE_TYPE (name),
LOOKUP_NORMAL);
}
- else if (explicit_targs == NULL_TREE)
+ else if (! template_only)
candidates = add_function_candidate (candidates, t,
this_arglist, flags);
}
}
- if (TREE_CODE (olddecl) == FUNCTION_DECL
- && ! DECL_USE_TEMPLATE (olddecl))
+ if (DECL_USE_TEMPLATE (olddecl))
+ ;
+ else if (TREE_CODE (olddecl) == FUNCTION_DECL)
{
tree t1 = TYPE_ARG_TYPES (TREE_TYPE (olddecl));
tree t2 = TYPE_ARG_TYPES (TREE_TYPE (newdecl));
OB_PUTC ('_');
icat (i);
if (i > 9)
- OB_PUTS ('_');
+ OB_PUTC ('_');
}
/* Encoding for an INTEGER_CST value. */
fn = TREE_VALUE (fn);
for (; fn; fn = DECL_CHAIN (fn))
- if (decls_match (fn, decl) && DECL_DEFER_OUTPUT (fn))
- {
- result = fn;
- break;
- }
- else if (TREE_CODE (fn) == TEMPLATE_DECL)
+ if (TREE_CODE (fn) == TEMPLATE_DECL)
templates = decl_tree_cons (NULL_TREE, fn, templates);
}
}
else if (name = DECL_NAME (decl), fn = IDENTIFIER_GLOBAL_VALUE (name), fn)
{
for (fn = get_first_fn (fn); fn; fn = DECL_CHAIN (fn))
- if (decls_match (fn, decl) && DECL_DEFER_OUTPUT (fn))
- {
- result = fn;
- break;
- }
- else if (TREE_CODE (fn) == TEMPLATE_DECL)
+ if (TREE_CODE (fn) == TEMPLATE_DECL)
templates = decl_tree_cons (NULL_TREE, fn, templates);
}
be non-zero in the case of processing a default function.
The second may be non-zero in the case of a template function. */
x = DECL_MAIN_VARIANT (x);
- if ((DECL_THIS_INLINE (x) || DECL_PENDING_INLINE_INFO (x))
- && (DECL_CONTEXT (x) == NULL_TREE
- || TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (x))) != 't'
- || ! CLASSTYPE_INTERFACE_ONLY (DECL_CONTEXT (x))))
- {
- mark_inline_for_output (x);
- if (x == current_function_decl)
- DECL_EXTERNAL (x) = 0;
- }
if (DECL_TEMPLATE_INFO (x) && !DECL_TEMPLATE_SPECIALIZATION (x))
mark_used (x);
TREE_ADDRESSABLE (x) = 1;