mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
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
This commit is contained in:
parent
3a81b570d2
commit
5edc02ac22
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
13
gcc/testsuite/g++.dg/overload/addr2.C
Normal file
13
gcc/testsuite/g++.dg/overload/addr2.C
Normal file
@ -0,0 +1,13 @@
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user