This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Remove TYPE_ORIG_SIZE_TYPE
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Tue, 7 Sep 2010 17:51:04 +0200 (CEST)
- Subject: [PATCH] Remove TYPE_ORIG_SIZE_TYPE
This removes TYPE_ORIG_SIZE_TYPE which clashes with TYPE_CACHED_VALUES
and appears to be unused (it's never set for internal sizetypes which
I believe was the original use). The patch thus removes it and the
only read-only useds in c-typeck.c.
Bootstrapped and tested on x86_64-unknown-linux-gnu with the
checks in c-typeck.c replaced by asserts that the specific case
does not happen (gcc_unreachable () instead of the assignment).
Ok for trunk?
Thanks,
Richard.
2010-09-07 Richard Guenther <rguenther@suse.de>
* tree.h (TYPE_ORIG_SIZE_TYPE): Remove.
* c-typeck.c (comptypes_internal): Remove TYPE_ORIG_SIZE_TYPE
checks.
Index: gcc/tree.h
===================================================================
*** gcc/tree.h (revision 163947)
--- gcc/tree.h (working copy)
*************** struct GTY(()) tree_block {
*** 2056,2064 ****
#define TYPE_DOMAIN(NODE) (ARRAY_TYPE_CHECK (NODE)->type.values)
#define TYPE_FIELDS(NODE) (RECORD_OR_UNION_CHECK (NODE)->type.values)
#define TYPE_CACHED_VALUES(NODE) (TYPE_CHECK(NODE)->type.values)
- #define TYPE_ORIG_SIZE_TYPE(NODE) \
- (INTEGER_TYPE_CHECK (NODE)->type.values \
- ? TREE_TYPE ((NODE)->type.values) : NULL_TREE)
#define TYPE_METHODS(NODE) (RECORD_OR_UNION_CHECK (NODE)->type.maxval)
#define TYPE_VFIELD(NODE) (RECORD_OR_UNION_CHECK (NODE)->type.minval)
#define TYPE_ARG_TYPES(NODE) (FUNC_OR_METHOD_CHECK (NODE)->type.values)
--- 2056,2061 ----
Index: gcc/c-typeck.c
===================================================================
*** gcc/c-typeck.c (revision 163947)
--- gcc/c-typeck.c (working copy)
*************** comptypes_internal (const_tree type1, co
*** 1038,1054 ****
|| TREE_CODE (t1) == ERROR_MARK || TREE_CODE (t2) == ERROR_MARK)
return 1;
- /* If either type is the internal version of sizetype, return the
- language version. */
- if (TREE_CODE (t1) == INTEGER_TYPE && TYPE_IS_SIZETYPE (t1)
- && TYPE_ORIG_SIZE_TYPE (t1))
- t1 = TYPE_ORIG_SIZE_TYPE (t1);
-
- if (TREE_CODE (t2) == INTEGER_TYPE && TYPE_IS_SIZETYPE (t2)
- && TYPE_ORIG_SIZE_TYPE (t2))
- t2 = TYPE_ORIG_SIZE_TYPE (t2);
-
-
/* Enumerated types are compatible with integer types, but this is
not transitive: two enumerated types in the same translation unit
are compatible with each other only if they are the same type. */
--- 1038,1043 ----