From 82cf684b41e3b26837a0df5d5b8ec3d38e5709a6 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 26 Mar 2002 01:06:11 -0800 Subject: [PATCH] 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 --- gcc/expr.h | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/gcc/expr.h b/gcc/expr.h index 17f09b1..792c18c 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. */ -- 2.7.4