OSDN Git Service

* cvt.c (ocp_convert): Only abort if we try to convert an object
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Apr 2003 20:07:56 +0000 (20:07 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Apr 2003 20:07:56 +0000 (20:07 +0000)
        of TREE_ADDRESSABLE type.

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

gcc/cp/ChangeLog
gcc/cp/cvt.c

index 06109bf..a8bff85 100644 (file)
@@ -1,5 +1,8 @@
 2003-04-03  Jason Merrill  <jason@redhat.com>
 
+       * cvt.c (ocp_convert): Only abort if we try to convert an object
+       of TREE_ADDRESSABLE type.
+
        * class.c (build_vtable): Set DECL_ALIGN here.
        (get_vtable_decl): Not here.
        (layout_vtable_decl): Or here.
index 19bca82..c62edf0 100644 (file)
@@ -647,7 +647,8 @@ ocp_convert (tree type, tree expr, int convtype, int flags)
          TREE_TYPE (e) = TREE_TYPE (TARGET_EXPR_SLOT (e)) = type;
          return e;
        }
-      else if (CLASS_TYPE_P (type))
+      else if (TREE_ADDRESSABLE (type))
+       /* We shouldn't be treating objects of ADDRESSABLE type as rvalues.  */
        abort ();
       else
        return fold (build1 (NOP_EXPR, type, e));