Commit 2944f36d by Jason Merrill Committed by Jason Merrill

* tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.

From-SVN: r248302
parent 281161d1
2017-05-19 Jason Merrill <jason@redhat.com>
* tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
2017-05-19 Marek Polacek <polacek@redhat.com>
PR sanitizer/80800
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment