aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-02-13 01:37:30 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-02-12 20:37:30 -0500
commit2dbfb4181cac4d7da8fa16a00139c432cce6de62 (patch)
treee088c1ec46647e454b26742aa5eacca00973dea9 /gcc
parent1398405bf8931a3216543e09ecf2b08da8b2ca37 (diff)
downloadgcc-2dbfb4181cac4d7da8fa16a00139c432cce6de62.zip
gcc-2dbfb4181cac4d7da8fa16a00139c432cce6de62.tar.gz
gcc-2dbfb4181cac4d7da8fa16a00139c432cce6de62.tar.bz2
* call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
From-SVN: r17898
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/call.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 70186da..0054db6 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
+
Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
* cp-tree.h: Add access_protected_virtual_node.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index d30092e..299e0a4 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3212,7 +3212,11 @@ standard_conversion (to, from, expr)
}
else if (IS_AGGR_TYPE (to) && IS_AGGR_TYPE (from)
&& DERIVED_FROM_P (to, from))
- conv = build_conv (BASE_CONV, to, conv);
+ {
+ if (TREE_CODE (conv) == RVALUE_CONV)
+ conv = TREE_OPERAND (conv, 0);
+ conv = build_conv (BASE_CONV, to, conv);
+ }
else
return 0;