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
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
Wcast-function-type.C
blob
c649405179151729abe56530a0491016032df8e4
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
}