OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
new
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.ext
/
addrfunc1.C
1
// Test that taking the address of a member function name produces
2
// a pointer to member function.
3
// Contributed by Jason Merrill <jason@cygnus.com>
4
// Special g++ Options: -fpermissive -w
5
// Build don't link:
6
7
struct A { };
8
int (A::*p)();
9
10
struct B {
11
int f () { return 0; }
12
void g ();
13
};
14
15
void B::g ()
16
{
17
p = (int (A::*)())&f;
18
}