Commit 5edc02ac by Paolo Carlini Committed by Paolo Carlini

re PR c++/29143 (address-of overloaded function does not work in function call)

/cp
2013-11-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/29143
	* semantics.c (finish_call_expr): Ensure that for OVERLOADs too
	'(&f)(...)' is the same as '(f)(...)', per 13.3.1.1.

/testsuite
2013-11-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/29143
	* g++.dg/overload/addr2.C: New.
	* g++.old-deja/g++.other/overload11.C: Adjust.

From-SVN: r204898
parent 3a81b570
2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/29143
* g++.dg/overload/addr2.C: New.
* g++.old-deja/g++.other/overload11.C: Adjust.
2013-11-15 Mike Stump <mikestump@comcast.net>
* lib/gcc.exp (gcc_target_compile): Add support for random runtime
......
// PR c++/29143
void f(int);
void g(int,int);
void g(int,int,int);
void
h ()
{
(&f)(1);
(&g)(1,2,3);
}
......@@ -32,7 +32,7 @@ int main (int argc, char **argv)
void (*vptr) ();
(ovl) (1); // ok
(&ovl) (1); // { dg-error "" } not suitable for overload resolution
(&ovl) (1); // ok
(ovl) (); // { dg-error "" } no matching candidates
// { dg-message "candidate" "candidate note" { target *-*-* } 36 }
(&ovl) (); // { dg-error "" } not suitable for overload resolution
......
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