From 7c355bca10d745fdac57df6a07e1c92fbe3ed8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 5 Nov 1999 23:11:58 +0000 Subject: cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro. * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro. (DECL_TEMPLATE_INFO): Use it. * decl.c (warn_extern_redeclared_static): Do nothing for TEMPLATE_DECLs. * decl2.c (mark_used): Explicitly check for function or variable. * semantics.c (finish_unary_op_expr): Check whether result is also an INTEGER_CST. From-SVN: r30426 --- gcc/cp/decl2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gcc/cp/decl2.c') diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 82264e4..5624767 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -5152,11 +5152,9 @@ mark_used (decl) /* If this is a function or variable that is an instance of some template, we now know that we will need to actually do the - instantiation. A TEMPLATE_DECL may also have DECL_TEMPLATE_INFO, - if it's a partial instantiation, but there's no need to - instantiate such a thing. We check that DECL is not an explicit + instantiation. We check that DECL is not an explicit instantiation because that is not checked in instantiate_decl. */ - if (TREE_CODE (decl) != TEMPLATE_DECL + if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) && DECL_LANG_SPECIFIC (decl) && DECL_TEMPLATE_INFO (decl) && !DECL_EXPLICIT_INSTANTIATION (decl)) instantiate_decl (decl); -- cgit v1.1