Use array range beginning with one
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user