aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authormerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1994-09-02 23:40:51 +0000
committermerrill <merrill@138bc75d-0d04-0410-961f-82ee72b054a4>1994-09-02 23:40:51 +0000
commitf6a1e8dcdb6274ff04e7f6b3a197a86fbf470c69 (patch)
tree47c12872677811354e9556b5373b1400fc35c33e /gcc/c-decl.c
parenta9b9d10c2c9d2ac2d096f4b5887cfcf0cddadb5c (diff)
(min_precision): Move to c-common.c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8021 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index c861ed32cc5..57796336188 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5647,37 +5647,6 @@ start_enum (name)
return enumtype;
}
-/* Return the minimum number of bits needed to represent VALUE in a
- signed or unsigned type, UNSIGNEDP says which. */
-
-static int
-min_precision (value, unsignedp)
- tree value;
- int unsignedp;
-{
- int log;
-
- /* If the value is negative, compute its negative minus 1. The latter
- adjustment is because the absolute value of the largest negative value
- is one larger than the largest positive value. This is equivalent to
- a bit-wise negation, so use that operation instead. */
-
- if (tree_int_cst_sgn (value) < 0)
- value = fold (build1 (BIT_NOT_EXPR, TREE_TYPE (value), value));
-
- /* Return the number of bits needed, taking into account the fact
- that we need one more bit for a signed than unsigned type. */
-
- if (integer_zerop (value))
- log = 0;
- else if (TREE_INT_CST_HIGH (value) != 0)
- log = HOST_BITS_PER_WIDE_INT + floor_log2 (TREE_INT_CST_HIGH (value));
- else
- log = floor_log2 (TREE_INT_CST_LOW (value));
-
- return log + 1 + ! unsignedp;
-}
-
/* After processing and defining all the values of an enumeration type,
install their decls in the enumeration type and finish it off.
ENUMTYPE is the type object and VALUES a list of decl-value pairs.