aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-01-05 22:52:25 +0000
committerRichard Stallman <rms@gnu.org>1993-01-05 22:52:25 +0000
commitfa42713123b2379c61cdf1894c5c40c1e2f3381f (patch)
tree7de99b37a0affd05e1b8fc071e61d20f7dca4a45 /gcc
parentf159813b6a0665d3d33e883d85229e39551a7560 (diff)
downloadgcc-fa42713123b2379c61cdf1894c5c40c1e2f3381f.zip
gcc-fa42713123b2379c61cdf1894c5c40c1e2f3381f.tar.gz
gcc-fa42713123b2379c61cdf1894c5c40c1e2f3381f.tar.bz2
(c_sizeof): Call force_fit_type only for INTEGER_CST.
From-SVN: r3103
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-typeck.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 756b610..04134a0 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -727,7 +727,9 @@ c_sizeof (type)
/* Convert in case a char is more than one unit. */
t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type),
size_int (TYPE_PRECISION (char_type_node)));
- force_fit_type (t);
+ /* size_binop does not put the constant in range, so do it now. */
+ if (TREE_CODE (t) == INTEGER_CST)
+ force_fit_type (t);
return t;
}