From c353b8e3fbee8bb8f72a2e9d45b935fb1bb5554f Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 26 Jan 2004 17:41:50 +0000 Subject: class.c (add_method): Just check processing_template_decl to determine whether or not we are within a... * class.c (add_method): Just check processing_template_decl to determine whether or not we are within a template. * decl2.c (maybe_retrofit_in_chrg): Likewise. * init.c (decl_constant_value): Check the type of the declaration, not TREE_READONLY. * name-lookup.c (maybe_push_to_top_level): Rename to ... (push_to_top_level): ... this. * name-lookup.h (maybe_push_to_top_level): Do not declare it. * pt.c (push_template_decl_real): Reorder condition for speed. (convert_template_argument): Use dependency-checking functions in place of uses_template_parms. (lookup_template_class): Avoid calling uses_template_parms more than once. (uses_template_parms): Reimplement, using dependency-checking functions. (instantiate_class_template): Use push_to_top_level, not maybe_push_to_top_level. (type_unification_real): Simplify. (type_dependent_expression_p): Handle OFFSET_REFs and TEMPLATE_DECLs. (any_dependent_template_arguments_p): Handle multiple levels of template argument. * semantics.c (expand_or_defer_fn): Do not check uses_template_parms for template instantiations. * typeck.c (comptypes): Avoid calling cp_type_quals. From-SVN: r76647 --- gcc/cp/semantics.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'gcc/cp/semantics.c') diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 3cf4e08..69364d8 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2930,14 +2930,8 @@ void expand_or_defer_fn (tree fn) { /* When the parser calls us after finishing the body of a template - function, we don't really want to expand the body. When we're - processing an in-class definition of an inline function, - PROCESSING_TEMPLATE_DECL will no longer be set here, so we have - to look at the function itself. */ - if (processing_template_decl - || (DECL_LANG_SPECIFIC (fn) - && DECL_TEMPLATE_INFO (fn) - && uses_template_parms (DECL_TI_ARGS (fn)))) + function, we don't really want to expand the body. */ + if (processing_template_decl) { /* Normally, collection only occurs in rest_of_compilation. So, if we don't collect here, we never collect junk generated -- cgit v1.1