aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-04-03 15:07:56 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-04-03 15:07:56 -0500
commit55a2af0c4219527cf5e46f1efbbab6f80cd2cb84 (patch)
tree9fe7a68a6fec8d5366580f847eb22bfe8da5fb61 /gcc/cp/cvt.c
parent773eae3968d667a04e0fadf85c2536ad2a313618 (diff)
downloadgcc-55a2af0c4219527cf5e46f1efbbab6f80cd2cb84.zip
gcc-55a2af0c4219527cf5e46f1efbbab6f80cd2cb84.tar.gz
gcc-55a2af0c4219527cf5e46f1efbbab6f80cd2cb84.tar.bz2
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
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r--gcc/cp/cvt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index 19bca82..c62edf0 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));