projects
/
gcc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
pr77285-2.C: Require tls_native support.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
Wcast-function-type.C
1
/* { dg-do compile } */
2
/* { dg-options "-Wcast-function-type" } */
3
4
struct S
5
{
6
void foo (int*);
7
void bar (int);
8
};
9
10
typedef void (S::*MF)(int);
11
12
void
13
foo (void)
14
{
15
MF p1 = (MF)&S::foo; /* { dg-warning "pointer to member" } */
16
MF p2 = (MF)&S::bar; /* { dg-bogus "pointer to member" } */
17
}