aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/ChangeLog5
-rw-r--r--gcc/objc/objc-act.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index ddfdb1c..20b0fe4 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * objc-act.c (objc_decl_method_attributes): Use wi::to_wide when
+ operating on trees as wide_ints.
+
2017-09-29 Jakub Jelinek <jakub@redhat.com>
* objc-act.c (check_ivars, gen_declaration): For OBJCPLUS look at
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 5d81af7..ce2adcc 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -4900,10 +4900,10 @@ objc_decl_method_attributes (tree *node, tree attributes, int flags)
number = TREE_VALUE (second_argument);
if (number
&& TREE_CODE (number) == INTEGER_CST
- && !wi::eq_p (number, 0))
+ && wi::to_wide (number) != 0)
TREE_VALUE (second_argument)
= wide_int_to_tree (TREE_TYPE (number),
- wi::add (number, 2));
+ wi::to_wide (number) + 2);
/* This is the third argument, the "first-to-check",
which specifies the index of the first argument to
@@ -4913,10 +4913,10 @@ objc_decl_method_attributes (tree *node, tree attributes, int flags)
number = TREE_VALUE (third_argument);
if (number
&& TREE_CODE (number) == INTEGER_CST
- && !wi::eq_p (number, 0))
+ && wi::to_wide (number) != 0)
TREE_VALUE (third_argument)
= wide_int_to_tree (TREE_TYPE (number),
- wi::add (number, 2));
+ wi::to_wide (number) + 2);
}
filtered_attributes = chainon (filtered_attributes,
new_attribute);
@@ -4949,10 +4949,10 @@ objc_decl_method_attributes (tree *node, tree attributes, int flags)
/* Get the value of the argument and add 2. */
tree number = TREE_VALUE (argument);
if (number && TREE_CODE (number) == INTEGER_CST
- && !wi::eq_p (number, 0))
+ && wi::to_wide (number) != 0)
TREE_VALUE (argument)
= wide_int_to_tree (TREE_TYPE (number),
- wi::add (number, 2));
+ wi::to_wide (number) + 2);
argument = TREE_CHAIN (argument);
}