Commit 82cf684b by Richard Henderson

expr.h (ADD_PARM_SIZE): Cast INC to ssizetype.

        * expr.h (ADD_PARM_SIZE): Cast INC to ssizetype.
        (SUB_PARM_SIZE): Cast DEC to ssizetype.

From-SVN: r51379
parent f36dea3c
...@@ -75,23 +75,30 @@ struct args_size ...@@ -75,23 +75,30 @@ struct args_size
/* Add the value of the tree INC to the `struct args_size' TO. */ /* Add the value of the tree INC to the `struct args_size' TO. */
#define ADD_PARM_SIZE(TO, INC) \ #define ADD_PARM_SIZE(TO, INC) \
{ tree inc = (INC); \ do { \
if (host_integerp (inc, 0)) \ tree inc = (INC); \
(TO).constant += tree_low_cst (inc, 0); \ if (host_integerp (inc, 0)) \
else if ((TO).var == 0) \ (TO).constant += tree_low_cst (inc, 0); \
(TO).var = inc; \ else if ((TO).var == 0) \
else \ (TO).var = inc; \
(TO).var = size_binop (PLUS_EXPR, (TO).var, inc); } else \
(TO).var = size_binop (PLUS_EXPR, (TO).var, \
#define SUB_PARM_SIZE(TO, DEC) \ convert (ssizetype, inc)); \
{ tree dec = (DEC); \ } while (0)
if (host_integerp (dec, 0)) \
(TO).constant -= tree_low_cst (dec, 0); \ #define SUB_PARM_SIZE(TO, DEC) \
else if ((TO).var == 0) \ do { \
(TO).var = size_binop (MINUS_EXPR, ssize_int (0), dec); \ tree dec = (DEC); \
else \ if (host_integerp (dec, 0)) \
(TO).var = size_binop (MINUS_EXPR, (TO).var, dec); } (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 /* Convert the implicit sum in a `struct args_size' into a tree
of type ssizetype. */ of type ssizetype. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment