cvt.c (ocp_convert): Only abort if we try to convert an object of TREE_ADDRESSABLE...
authorJason Merrill <jason@redhat.com>
Thu, 3 Apr 2003 20:07:56 +0000 (15:07 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 3 Apr 2003 20:07:56 +0000 (15:07 -0500)
        * cvt.c (ocp_convert): Only abort if we try to convert an object
        of TREE_ADDRESSABLE type.

From-SVN: r65212

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

index 06109bfefad4458232ebe13910e3078d5d8a1672..a8bff85d3f9cb467a0c6ac439d18374bf89be265 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 19bca82f07603d3e2c11d57d7d9db46097426e22..c62edf09cb85486e6097307d86a1a5b268e1c272 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));