summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-09 22:52:15 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-09 22:52:15 +0000
commit75727131c7c5159354955d656f54eb8d607a5dbc (patch)
tree4de19a30c2e500a3bd92573466eb0c077bdc3631 /gcc/c-common.c
parent09f4d9b91c0d875726c8dc4cc9f8e0be3f63f23e (diff)
downloadgcc-75727131c7c5159354955d656f54eb8d607a5dbc.tar.gz
* c-common.c (shorten_compare): Don't special-case min/maxval
for C enumerations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91974 138bc75d-0d04-0410-961f-82ee72b054a4
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 a6f303b814e..fa555a72588 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);