summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-02 18:29:56 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-02 18:29:56 +0000
commit46fd717713e993a8c47b82bec1c12d692c520add (patch)
tree012b815e352352c505a47f997f46e1b9d2d6618a /gcc/c-typeck.c
parent3928b6b2baf7075ea518d16a8075b2e8930258df (diff)
downloadppe42-gcc-46fd717713e993a8c47b82bec1c12d692c520add.tar.gz
ppe42-gcc-46fd717713e993a8c47b82bec1c12d692c520add.zip
* c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink
reference the language-equivalent of sizetype. * c-typeck.c (comptypes): Treat sizetype like its language equivalent. * fold-const.c (size_binop, size_diffop): Put back checks. * gcse.c (dump_hash_table): Fix minor error in last change. * stor-layout.c (set_sizetype): Set TYPE_DOMAIN of sizetype. Clear TYPE_{NEXT,MAIN}_VARIANT and TYPE_{POINTER,REFERENCE}_to of all sizetypes. * cp/typeck.c (comptypes): Treat sizetype like its language equivalent. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32291 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 01446f2b859..6d85c359280 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -436,6 +436,16 @@ comptypes (type1, type2)
|| 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_DOMAIN (t1) != 0)
+ t1 = TYPE_DOMAIN (t1);
+
+ if (TREE_CODE (t2) == INTEGER_TYPE && TYPE_IS_SIZETYPE (t2)
+ && TYPE_DOMAIN (t2) != 0)
+ t2 = TYPE_DOMAIN (t2);
+
/* Treat an enum type as the integer type of the same width and
signedness. */
OpenPOWER on IntegriCloud