aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-12-09 14:52:15 -0800
committerRichard Henderson <rth@gcc.gnu.org>2004-12-09 14:52:15 -0800
commit88b3da50a83f81da86e28d0b99886fa8b819ead4 (patch)
tree4de19a30c2e500a3bd92573466eb0c077bdc3631 /gcc/c-common.c
parentf80f1bab3860f8a933d5319f668a29ea9edf54fe (diff)
downloadgcc-88b3da50a83f81da86e28d0b99886fa8b819ead4.zip
gcc-88b3da50a83f81da86e28d0b99886fa8b819ead4.tar.gz
gcc-88b3da50a83f81da86e28d0b99886fa8b819ead4.tar.bz2
c-common.c (shorten_compare): Don't special-case min/maxval for C enumerations.
* c-common.c (shorten_compare): Don't special-case min/maxval for C enumerations. From-SVN: r91974
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index a6f303b..fa555a7 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1983,14 +1983,6 @@ shorten_compare (tree *op0_ptr, tree *op1_ptr, tree *restype_ptr,
type = c_common_signed_or_unsigned_type (unsignedp0,
TREE_TYPE (primop0));
- /* In C, if TYPE is an enumeration, then we need to get its
- min/max values from its underlying integral type, not the
- enumerated type itself. In C++, TYPE_MAX_VALUE and
- TYPE_MIN_VALUE have already been set correctly on the
- enumeration type. */
- if (!c_dialect_cxx () && TREE_CODE (type) == ENUMERAL_TYPE)
- type = c_common_type_for_size (TYPE_PRECISION (type), unsignedp0);
-
maxval = TYPE_MAX_VALUE (type);
minval = TYPE_MIN_VALUE (type);