aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>2002-10-11 21:10:00 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2002-10-11 21:10:00 +0000
commita0bed689af362730fc12c06706035d679d7c4a69 (patch)
tree70e569fabd7c20b1d482290090569a1e037d0fb9 /gcc/tree.c
parentdb6556348d92709dfaa930251b5aa0fd5cb740c3 (diff)
downloadgcc-a0bed689af362730fc12c06706035d679d7c4a69.zip
gcc-a0bed689af362730fc12c06706035d679d7c4a69.tar.gz
gcc-a0bed689af362730fc12c06706035d679d7c4a69.tar.bz2
cfganal.c (dfs_enumerate_from): Use PARAMS.
* cfganal.c (dfs_enumerate_from): Use PARAMS. * genautomata.c (output_insn_code_cases): Likewise. * real.c (real_format): Likewise. * tree.c (tree_size): Revise expressions using TREE_CODE_LENGTH to ensure value is promoted before doing subtraction. From-SVN: r58064
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 202b07b..dac15ad 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -177,7 +177,7 @@ tree_size (node)
case '1': /* a unary arithmetic expression */
case '2': /* a binary arithmetic expression */
return (sizeof (struct tree_exp)
- + (TREE_CODE_LENGTH (code) - 1) * sizeof (char *));
+ + TREE_CODE_LENGTH (code) * sizeof (char *) - sizeof (char *));
case 'c': /* a constant */
/* We can't use TREE_CODE_LENGTH for INTEGER_CST, since the number of
@@ -199,7 +199,7 @@ tree_size (node)
length = (sizeof (struct tree_common)
+ TREE_CODE_LENGTH (code) * sizeof (char *));
if (code == TREE_VEC)
- length += (TREE_VEC_LENGTH (node) - 1) * sizeof (char *);
+ length += TREE_VEC_LENGTH (node) * sizeof (char *) - sizeof (char *);
return length;
}