This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] cp/pt.c: Remove template_parameter_pack_p.
- From: Kazu Hirata <kazu at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: doug dot gregor at gmail dot com
- Date: Sat, 7 Jul 2007 06:37:57 -0700
- Subject: [patch] cp/pt.c: Remove template_parameter_pack_p.
Hi,
Attached is a patch to remove template_parameter_pack_p as it is
unused.
The following patch made removed the last use of it.
2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
PR c++/31431
PR c++/31432
:
* error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
* cp-tree.h (check_for_bare_parameter_packs): Returns bool.
:
Built cc1plus. OK to apply?
Kazu Hirata
2007-07-07 Kazu Hirata <kazu@codesourcery.com>
* pt.c (template_parms_variadic_p): Remove.
* cp-tree.h: Remove the prototype for template_parms_variadic_p.
Index: cp-tree.h
===================================================================
--- cp-tree.h (revision 126440)
+++ cp-tree.h (working copy)
@@ -4416,7 +4416,6 @@ extern tree instantiate_decl (tree, in
extern int comp_template_parms (tree, tree);
extern bool uses_parameter_packs (tree);
extern bool template_parameter_pack_p (tree);
-extern bool template_parms_variadic_p (tree);
extern tree make_pack_expansion (tree);
extern bool check_for_bare_parameter_packs (tree);
extern int template_class_depth (tree);
Index: pt.c
===================================================================
--- pt.c (revision 126440)
+++ pt.c (working copy)
@@ -2334,17 +2334,6 @@ template_parameter_pack_p (tree parm)
&& TEMPLATE_TYPE_PARAMETER_PACK (parm));
}
-/* Determine whether PARMS describes a variadic template parameter
- list, i.e., one that is terminated by a template parameter pack. */
-bool
-template_parms_variadic_p (tree parms)
-{
- int nparms = TREE_VEC_LENGTH (parms);
- tree last_parm = TREE_VALUE (TREE_VEC_ELT (parms, nparms - 1));
-
- return template_parameter_pack_p (last_parm);
-}
-
/* Determine whether ARGS describes a variadic template args list,
i.e., one that is terminated by a template argument pack. */
static bool