diff options
author | Martin v. Löwis <loewis@informatik.hu-berlin.de> | 1999-11-05 23:11:58 +0000 |
---|---|---|
committer | Martin v. Löwis <loewis@gcc.gnu.org> | 1999-11-05 23:11:58 +0000 |
commit | 7c355bca10d745fdac57df6a07e1c92fbe3ed8af (patch) | |
tree | 3a2d5b2d2ea6a81be81deb66093129b9d26e96db /gcc/cp/decl2.c | |
parent | 32c8d1bc1f573799d31e4d443e7deb09f1b3e6c5 (diff) | |
download | gcc-7c355bca10d745fdac57df6a07e1c92fbe3ed8af.zip gcc-7c355bca10d745fdac57df6a07e1c92fbe3ed8af.tar.gz gcc-7c355bca10d745fdac57df6a07e1c92fbe3ed8af.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); |