This is the mail archive of the
mailing list for the GCC project.
[patch] cleanup: remove superfluous assertion in cp/pt.c
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 17 Jun 2005 21:27:53 +0200 (CEST)
- Subject: [patch] cleanup: remove superfluous assertion in cp/pt.c
gcc_assert (TMPL_ARGS_DEPTH (args)
== TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl)));
in register_specialization from cp/pt.c right before the call to
retrieve_specialization is superfluous, since the same condition is
checked at the top of the callee.
The following patch removes the assertion before the call.
Bootstrapped and regtested.
Ok for mainline?
2005-06-17 Volker Reichelt <firstname.lastname@example.org>
* pt.c (register_specialization): Remove superfluous assertion.
--- gcc/gcc/cp/pt.c 3 Jun 2005 16:18:30 -0000 1.978.2.12
+++ gcc/gcc/cp/pt.c 17 Jun 2005 09:17:38 -0000
@@ -1140,11 +1140,6 @@ register_specialization (tree spec, tree
instantiation unless and until it is actually needed. */
- /* There should be as many levels of arguments as there are
- levels of parameters. */
- gcc_assert (TMPL_ARGS_DEPTH (args)
- == TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl)));
fn = retrieve_specialization (tmpl, args,
/* We can sometimes try to re-register a specialization that we've