Use array range beginning with one

This commit is contained in:
2025-07-17 11:44:42 +02:00
parent 34abb6b4f5
commit 32d4683315
4 changed files with 370 additions and 372 deletions

View File

@ -21,7 +21,6 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "stor-layout.h"
#include "fold-const.h"
#include "diagnostic-core.h"
namespace elna::gcc
@ -248,9 +247,8 @@ namespace elna::gcc
tree build_static_array_type(tree type, const std::uint64_t size)
{
tree lower_bound = build_int_cst_type(integer_type_node, 0);
tree upper_bound = build_int_cst_type(integer_type_node, size);
tree range_type = build_range_type(integer_type_node, lower_bound, upper_bound);
tree range_type = build_range_type(integer_type_node, size_one_node, upper_bound);
return build_array_type(type, range_type);
}