diff options
author | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-11 21:10:00 +0000 |
---|---|---|
committer | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-11 21:10:00 +0000 |
commit | 0b5213559d10fca2937b4ef8c9722523bc29648b (patch) | |
tree | 70e569fabd7c20b1d482290090569a1e037d0fb9 /gcc/tree.c | |
parent | 0d86b7af93844f64e5357635b8a76e4bd7c123ff (diff) | |
download | gcc-0b5213559d10fca2937b4ef8c9722523bc29648b.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58064 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 202b07b8eb0..dac15adaa71 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; } |