summaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-19 07:27:30 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-19 07:27:30 +0000
commitd45cef9bf61bc04f0153b88852766cff70c4a293 (patch)
tree78c8fee7aeff0e01a8b8cc9aef49a891bccb39a7 /gcc/cp/call.c
parente89160e3a280febf1e42f9b80b8f723c45a50e16 (diff)
downloadgcc-d45cef9bf61bc04f0153b88852766cff70c4a293.tar.gz
* semantics.c (finish_pseudo_destructor_expr): Allow differing
cv-qualification between the type named by the pseudo-destructor-name and the object-type. * search.c (accessible_base_p): Handle non-proper bases. * name-lookup.c (do_nonmember_using_decl): If a using declaration refers to a single overloaded function, set the type of the function. * tree.c (lvalue_type): Simplify. * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an unknown type. (build_unary_op): Handle OVERLOADs with known types. * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for function templates. * parser.c (cp_parser_postfix_expression): Handle the use of "typename" in non-dependent contexts. Convert appropriately when when using a qualified name after "->" or ".". * call.c (conditional_conversion): Honor the requirement that some conversions refer to the original object. * g++.dg/expr/dtor2.C: New test. * g++.dg/lookup/anon4.C: New test. * g++.dg/overload/using1.C: New test. * g++.dg/template/lookup7.C: New test. * g++.dg/template/typename6.C: New test. * g++.dg/expr/cond6.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79671 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 7a3039bd3b8..7270ed6742d 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -3072,10 +3072,7 @@ conditional_conversion (tree e1, tree e2)
same cv-qualification as, or a greater cv-qualification than, the
cv-qualification of T1. If the conversion is applied, E1 is
changed to an rvalue of type T2 that still refers to the original
- source class object (or the appropriate subobject thereof).
-
- FIXME we can't express an rvalue that refers to the original object;
- we have to create a new one. */
+ source class object (or the appropriate subobject thereof). */
if (CLASS_TYPE_P (t1) && CLASS_TYPE_P (t2)
&& ((good_base = DERIVED_FROM_P (t2, t1)) || DERIVED_FROM_P (t1, t2)))
{
@@ -3084,10 +3081,7 @@ conditional_conversion (tree e1, tree e2)
conv = build_identity_conv (t1, e1);
if (!same_type_p (TYPE_MAIN_VARIANT (t1),
TYPE_MAIN_VARIANT (t2)))
- {
- conv = build_conv (ck_base, t2, conv);
- conv->need_temporary_p = true;
- }
+ conv = build_conv (ck_base, t2, conv);
else
conv = build_conv (ck_rvalue, t2, conv);
return conv;