From: Jason Merrill Date: Fri, 19 May 2017 18:55:17 +0000 (-0400) Subject: * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2944f36d0290654a3783c62e08347aebbce19cf4;p=gcc.git * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t. From-SVN: r248302 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00aa02c67b1..2b490dc5711 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-19 Jason Merrill + + * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t. + 2017-05-19 Marek Polacek PR sanitizer/80800 diff --git a/gcc/tree.c b/gcc/tree.c index 75067258313..db316207369 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -2268,7 +2268,7 @@ tree make_tree_vec_stat (int len MEM_STAT_DECL) { tree t; - int length = (len - 1) * sizeof (tree) + sizeof (struct tree_vec); + size_t length = (len - 1) * sizeof (tree) + sizeof (struct tree_vec); record_node_allocation_statistics (TREE_VEC, length); @@ -2290,8 +2290,8 @@ grow_tree_vec_stat (tree v, int len MEM_STAT_DECL) int oldlen = TREE_VEC_LENGTH (v); gcc_assert (len > oldlen); - int oldlength = (oldlen - 1) * sizeof (tree) + sizeof (struct tree_vec); - int length = (len - 1) * sizeof (tree) + sizeof (struct tree_vec); + size_t oldlength = (oldlen - 1) * sizeof (tree) + sizeof (struct tree_vec); + size_t length = (len - 1) * sizeof (tree) + sizeof (struct tree_vec); record_node_allocation_statistics (TREE_VEC, length - oldlength);