Commit e6baef83 by Jason Merrill Committed by Jason Merrill

re PR c++/48118 (g++ sometimes allows copying a volatile class)

	PR c++/48118
	* call.c (build_over_call): Don't skip ck_rvalue.

From-SVN: r171147
parent b4ef8aac
2011-03-18 Jason Merrill <jason@redhat.com>
PR c++/48118
* call.c (build_over_call): Don't skip ck_rvalue.
2011-03-17 Jason Merrill <jason@redhat.com> 2011-03-17 Jason Merrill <jason@redhat.com>
PR c++/47504 PR c++/47504
......
...@@ -6168,12 +6168,6 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) ...@@ -6168,12 +6168,6 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
conv = convs[i]; conv = convs[i];
/* Don't make a copy here if build_call is going to. */
if (conv->kind == ck_rvalue
&& COMPLETE_TYPE_P (complete_type (type))
&& !TREE_ADDRESSABLE (type))
conv = conv->u.next;
/* Warn about initializer_list deduction that isn't currently in the /* Warn about initializer_list deduction that isn't currently in the
working draft. */ working draft. */
if (cxx_dialect > cxx98 if (cxx_dialect > cxx98
......
2011-03-18 Jason Merrill <jason@redhat.com> 2011-03-18 Jason Merrill <jason@redhat.com>
* g++.dg/overload/volatile1.C: New.
* g++.dg/opt/pr23372.C: New. * g++.dg/opt/pr23372.C: New.
* g++.dg/ext/attrib32.C: Expect errors on the two-names case. * g++.dg/ext/attrib32.C: Expect errors on the two-names case.
......
// PR c++/48118
// { dg-prune-output "note" }
struct A { };
void f (A); // { dg-error "argument 1" }
void (*g)(A);
int main()
{
volatile A a;
f(a); // { dg-error "no match" }
g(a); // { dg-error "no match" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment