summaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/objc-act.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 21bac389f89..0d17eb28ea0 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -4923,7 +4923,8 @@ 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)
+ if (number && TREE_CODE (number) == INTEGER_CST
+ && !wide_int (number).zero_p ())
TREE_VALUE (argument)
= wide_int_to_tree (TREE_TYPE (number), wide_int (number) + 2);
argument = TREE_CHAIN (argument);