diff mbox

C++ PATCH for c++/55149 (lambda VLA capture)

Message ID 51C39DDC.60908@redhat.com
State New
Headers show

Commit Message

Jason Merrill June 21, 2013, 12:27 a.m. UTC
On 06/20/2013 08:26 PM, Jason Merrill wrote:
> Instantiation of a VLA capture in a template wasn't working properly;
> this fixes it.

Along with this, which fixes the type of an instantiation of the MINUS_EXPR.
diff mbox

Patch

commit c37ab236406b9acf4423e80554055bf72d7be5fa
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Jun 20 17:42:16 2013 -0400

    	* decl.c (compute_array_index_type): Use size_one_node.

diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 9eb1d12..dad1e10 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8241,7 +8241,7 @@  compute_array_index_type (tree name, tree size, tsubst_flags_t complain)
 	 constant. Just build the index type and mark that it requires
 	 structural equality checks.  */
       itype = build_index_type (build_min (MINUS_EXPR, sizetype,
-					   size, integer_one_node));
+					   size, size_one_node));
       TYPE_DEPENDENT_P (itype) = 1;
       TYPE_DEPENDENT_P_VALID (itype) = 1;
       SET_TYPE_STRUCTURAL_EQUALITY (itype);