call.c (build_op_delete_call): Test user-visible type against size_type_node...

* 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.

From-SVN: r118472
This commit is contained in:
Roger Sayle 2006-11-04 00:51:51 +00:00 committed by Roger Sayle
parent 4c9e00c875
commit c79154c4fa
5 changed files with 13 additions and 22 deletions

View File

@ -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.

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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))