repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merged revisions 208012,208018-208019,208021,208023-208030,208033,208037,208040-20804...
[official-gcc.git]
/
main
/
gcc
/
testsuite
/
g++.dg
/
ext
/
visibility
/
anon8.C
blob
b8507497d32c7e30d0af8d2651bca264e7c48207
1
// PR c++/34213
2
// { dg-do compile }
3
4
template <void (*fn) ()>
5
void call () // { dg-message "note" }
6
{
7
fn ();
8
}
9
10
namespace
11
{
12
struct B1
13
{
14
static void fn1 () {}
15
static void fn4 ();
16
};
17
void fn3 () {}
18
void B1::fn4 () {}
19
static void fn5 () {}
20
}
21
22
int main ()
23
{
24
struct B2
25
{
26
static void fn2 () {}
27
};
28
call<&B1::fn1> ();
29
call<&B2::fn2> (); // { dg-error "linkage|no matching" }
30
call<&fn3> ();
31
call<&B1::fn4> ();
32
call<&fn5> (); // { dg-error "linkage|no matching" "" { target { ! c++11 } } }
33
}