OSDN Git Service

* call.c (build_op_delete_call): Test user-visible type against
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Nov 2006 00:51:51 +0000 (00:51 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 4 Nov 2006 00:51:51 +0000 (00:51 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118472 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/class.c
gcc/cp/mangle.c
gcc/cp/typeck.c

index 6e30ada..9cd3d29 100644 (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.
index 79a2c4a..27ef203 100644 (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;
        }
index e4bf89e..75d56be 100644 (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;
     }
 
index 74ff854..5b8d338 100644 (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)
index c7bc060..242ae19 100644 (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))