Patchwork [c++] mark EXPR_PACK_EXPANSION as typed only, v2

login
register
mail settings
Submitter Jason Merrill
Date July 1, 2011, 12:01 a.m.
Message ID <4E0D0E43.1010404@redhat.com>
Download mbox | patch
Permalink /patch/102847/
State New
Headers show

Comments

Jason Merrill - July 1, 2011, 12:01 a.m.
On 05/09/2011 07:41 PM, Nathan Froyd wrote:
> I present the patch below.  We have a new function,
> cp_tree_operand_length, and the code has been retrofitted to use it in
> various places.

I've changed iterative_hash_template_arg to use it as well.

Tested x86_64-pc-linux-gnu, applying to trunk.

Patch

commit 9a83e9c63ea02e71cfb9df81478a4aed98a58611
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Jun 30 18:35:10 2011 -0400

    	* pt.c (iterative_hash_template_arg): Use cp_tree_operand_length.

diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index dc6cd50..4903044 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1609,7 +1609,7 @@  iterative_hash_template_arg (tree arg, hashval_t val)
     default:
       gcc_assert (IS_EXPR_CODE_CLASS (tclass));
       {
-	unsigned n = TREE_OPERAND_LENGTH (arg);
+	unsigned n = cp_tree_operand_length (arg);
 	for (i = 0; i < n; ++i)
 	  val = iterative_hash_template_arg (TREE_OPERAND (arg, i), val);
 	return val;