From: Richard Stallman Date: Tue, 5 Jan 1993 22:52:25 +0000 (+0000) Subject: (c_sizeof): Call force_fit_type only for INTEGER_CST. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa42713123b2379c61cdf1894c5c40c1e2f3381f;p=gcc.git (c_sizeof): Call force_fit_type only for INTEGER_CST. From-SVN: r3103 --- diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 756b610e382..04134a06a26 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; }