summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/cp/ChangeLog11
-rw-r--r--gcc/cp/call.c2
-rw-r--r--gcc/cp/class.c2
-rw-r--r--gcc/cp/mangle.c4
-rw-r--r--gcc/cp/typeck.c16
5 files changed, 13 insertions, 22 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6e30ada4873..9cd3d298ac0 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,14 @@
+2006-11-03 Roger Sayle <roger@eyesopen.com>
+
+ * call.c (build_op_delete_call): Test user-visible type against
+ size_type_node, instead of against the internal type, sizetype.
+ * class.c (type_requires_array_cookie): Likewise.
+ * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
+ handling of TYPE_IS_SIZETYPE.
+ * typeck.c (type_after_usual_arithmetic_conversions): Remove
+ special case handling of TYPE_IS_SIZETYPE.
+ (comptypes): Likewise.
+
2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
* decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 79a2c4a8346..27ef20347af 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4077,7 +4077,7 @@ build_op_delete_call (enum tree_code code, tree addr, tree size,
/* On the second pass, the second argument must be
"size_t". */
else if (pass == 1
- && same_type_p (TREE_VALUE (t), sizetype)
+ && same_type_p (TREE_VALUE (t), size_type_node)
&& TREE_CHAIN (t) == void_list_node)
break;
}
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index e4bf89e3ddc..75d56bea75a 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -4050,7 +4050,7 @@ type_requires_array_cookie (tree type)
argument is `size_t', it will be the usual deallocation
function -- unless there is one-argument function, too. */
if (TREE_CHAIN (second_parm) == void_list_node
- && same_type_p (TREE_VALUE (second_parm), sizetype))
+ && same_type_p (TREE_VALUE (second_parm), size_type_node))
has_two_argument_delete_p = true;
}
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 74ff8543eb4..5b8d338e910 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -1732,10 +1732,6 @@ write_builtin_type (tree type)
break;
case INTEGER_TYPE:
- /* If this is size_t, get the underlying int type. */
- if (TYPE_IS_SIZETYPE (type))
- type = TYPE_DOMAIN (type);
-
/* TYPE may still be wchar_t, since that isn't in
integer_type_nodes. */
if (type == wchar_type_node)
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index c7bc0609cc9..242ae1984dd 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -324,12 +324,6 @@ type_after_usual_arithmetic_conversions (tree t1, tree t2)
if (code1 != REAL_TYPE)
{
- /* If one is a sizetype, use it so size_binop doesn't blow up. */
- if (TYPE_IS_SIZETYPE (t1) > TYPE_IS_SIZETYPE (t2))
- return build_type_attribute_variant (t1, attributes);
- if (TYPE_IS_SIZETYPE (t2) > TYPE_IS_SIZETYPE (t1))
- return build_type_attribute_variant (t2, attributes);
-
/* If one is unsigned long long, then convert the other to unsigned
long long. */
if (same_type_p (TYPE_MAIN_VARIANT (t1), long_long_unsigned_type_node)
@@ -966,16 +960,6 @@ comptypes (tree t1, tree t2, int strict)
t2 = resolved;
}
- /* If either type is the internal version of sizetype, use 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);
-
if (TYPE_PTRMEMFUNC_P (t1))
t1 = TYPE_PTRMEMFUNC_FN_TYPE (t1);
if (TYPE_PTRMEMFUNC_P (t2))