aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 5cac488..c96d79d 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "dumpfile.h"
#include "splay-tree.h"
#include "gimplify.h"
+#include "wide-int.h"
/* The number of nested classes being processed. If we are not in the
scope of any class, this is zero. */
@@ -3811,7 +3812,7 @@ walk_subobject_offsets (tree type,
/* If this OFFSET is bigger than the MAX_OFFSET, then we should
stop. */
- if (max_offset && INT_CST_LT (max_offset, offset))
+ if (max_offset && tree_int_cst_lt (max_offset, offset))
return 0;
if (type == error_mark_node)
@@ -3968,8 +3969,8 @@ walk_subobject_offsets (tree type,
for (index = size_zero_node;
/* G++ 3.2 had an off-by-one error here. */
(abi_version_at_least (2)
- ? !INT_CST_LT (TYPE_MAX_VALUE (domain), index)
- : INT_CST_LT (index, TYPE_MAX_VALUE (domain)));
+ ? !tree_int_cst_lt (TYPE_MAX_VALUE (domain), index)
+ : tree_int_cst_lt (index, TYPE_MAX_VALUE (domain)));
index = size_binop (PLUS_EXPR, index, size_one_node))
{
r = walk_subobject_offsets (TREE_TYPE (type),
@@ -3985,7 +3986,7 @@ walk_subobject_offsets (tree type,
/* If this new OFFSET is bigger than the MAX_OFFSET, then
there's no point in iterating through the remaining
elements of the array. */
- if (max_offset && INT_CST_LT (max_offset, offset))
+ if (max_offset && tree_int_cst_lt (max_offset, offset))
break;
}
}
@@ -5922,7 +5923,7 @@ end_of_class (tree t, int include_virtuals_p)
continue;
offset = end_of_base (base_binfo);
- if (INT_CST_LT_UNSIGNED (result, offset))
+ if (tree_int_cst_lt (result, offset))
result = offset;
}
@@ -5932,7 +5933,7 @@ end_of_class (tree t, int include_virtuals_p)
vec_safe_iterate (vbases, i, &base_binfo); i++)
{
offset = end_of_base (base_binfo);
- if (INT_CST_LT_UNSIGNED (result, offset))
+ if (tree_int_cst_lt (result, offset))
result = offset;
}
@@ -6012,7 +6013,7 @@ include_empty_classes (record_layout_info rli)
CLASSTYPE_AS_BASE (rli->t) != NULL_TREE);
rli_size = rli_size_unit_so_far (rli);
if (TREE_CODE (rli_size) == INTEGER_CST
- && INT_CST_LT_UNSIGNED (rli_size, eoc))
+ && tree_int_cst_lt (rli_size, eoc))
{
if (!abi_version_at_least (2))
/* In version 1 of the ABI, the size of a class that ends with
@@ -6128,7 +6129,7 @@ layout_class_type (tree t, tree *virtuals_p)
type, then there are some special rules for allocating
it. */
if (DECL_C_BIT_FIELD (field)
- && INT_CST_LT (TYPE_SIZE (type), DECL_SIZE (field)))
+ && tree_int_cst_lt (TYPE_SIZE (type), DECL_SIZE (field)))
{
unsigned int itk;
tree integer_type;
@@ -6139,10 +6140,10 @@ layout_class_type (tree t, tree *virtuals_p)
bits as additional padding. */
for (itk = itk_char; itk != itk_none; ++itk)
if (integer_types[itk] != NULL_TREE
- && (INT_CST_LT (size_int (MAX_FIXED_MODE_SIZE),
- TYPE_SIZE (integer_types[itk]))
- || INT_CST_LT (DECL_SIZE (field),
- TYPE_SIZE (integer_types[itk]))))
+ && (tree_int_cst_lt (size_int (MAX_FIXED_MODE_SIZE),
+ TYPE_SIZE (integer_types[itk]))
+ || tree_int_cst_lt (DECL_SIZE (field),
+ TYPE_SIZE (integer_types[itk]))))
break;
/* ITK now indicates a type that is too large for the
@@ -6158,7 +6159,7 @@ layout_class_type (tree t, tree *virtuals_p)
3.2 always created a padding field, even if it had zero
width. */
if (!abi_version_at_least (2)
- || INT_CST_LT (TYPE_SIZE (integer_type), DECL_SIZE (field)))
+ || tree_int_cst_lt (TYPE_SIZE (integer_type), DECL_SIZE (field)))
{
if (abi_version_at_least (2) && TREE_CODE (t) == UNION_TYPE)
/* In a union, the padding field must have the full width