summaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-26 09:06:11 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-26 09:06:11 +0000
commitbe92c27ee0994a18986eb8ef7bfe219210a4e34b (patch)
tree69de35592993a6d89279814c29921385cb6ce4cd /gcc/expr.h
parenta719ae0107e2cfecc4f629168d7eca1723c107a3 (diff)
downloadgcc-be92c27ee0994a18986eb8ef7bfe219210a4e34b.tar.gz
* expr.h (ADD_PARM_SIZE): Cast INC to ssizetype.
(SUB_PARM_SIZE): Cast DEC to ssizetype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51379 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r--gcc/expr.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index 17f09b19a81..792c18c2423 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -75,23 +75,30 @@ struct args_size
/* Add the value of the tree INC to the `struct args_size' TO. */
-#define ADD_PARM_SIZE(TO, INC) \
-{ tree inc = (INC); \
- if (host_integerp (inc, 0)) \
- (TO).constant += tree_low_cst (inc, 0); \
- else if ((TO).var == 0) \
- (TO).var = inc; \
- else \
- (TO).var = size_binop (PLUS_EXPR, (TO).var, inc); }
-
-#define SUB_PARM_SIZE(TO, DEC) \
-{ tree dec = (DEC); \
- if (host_integerp (dec, 0)) \
- (TO).constant -= tree_low_cst (dec, 0); \
- else if ((TO).var == 0) \
- (TO).var = size_binop (MINUS_EXPR, ssize_int (0), dec); \
- else \
- (TO).var = size_binop (MINUS_EXPR, (TO).var, dec); }
+#define ADD_PARM_SIZE(TO, INC) \
+do { \
+ tree inc = (INC); \
+ if (host_integerp (inc, 0)) \
+ (TO).constant += tree_low_cst (inc, 0); \
+ else if ((TO).var == 0) \
+ (TO).var = inc; \
+ else \
+ (TO).var = size_binop (PLUS_EXPR, (TO).var, \
+ convert (ssizetype, inc)); \
+} while (0)
+
+#define SUB_PARM_SIZE(TO, DEC) \
+do { \
+ tree dec = (DEC); \
+ if (host_integerp (dec, 0)) \
+ (TO).constant -= tree_low_cst (dec, 0); \
+ else if ((TO).var == 0) \
+ (TO).var = size_binop (MINUS_EXPR, ssize_int (0), \
+ convert (ssizetype, dec)); \
+ else \
+ (TO).var = size_binop (MINUS_EXPR, (TO).var, \
+ convert (ssizetype, dec)); \
+} while (0)
/* Convert the implicit sum in a `struct args_size' into a tree
of type ssizetype. */