From: Jason Merrill Date: Thu, 3 Apr 2003 20:07:56 +0000 (-0500) Subject: cvt.c (ocp_convert): Only abort if we try to convert an object of TREE_ADDRESSABLE... X-Git-Tag: releases/gcc-3.4.0~7494 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55a2af0c4219527cf5e46f1efbbab6f80cd2cb84;p=thirdparty%2Fgcc.git cvt.c (ocp_convert): Only abort if we try to convert an object of TREE_ADDRESSABLE type. * cvt.c (ocp_convert): Only abort if we try to convert an object of TREE_ADDRESSABLE type. From-SVN: r65212 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 06109bfefad4..a8bff85d3f9c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2003-04-03 Jason Merrill + * 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. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index 19bca82f0760..c62edf09cb85 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -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));