aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/ptrfn4.C
blob: e1635c86483d521171af738fa47eb009d5ac256d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }
// { dg-options "-Wmissing-braces" }

struct S { };
typedef void (S::*fptr1) (int);

struct A {
  fptr1 f;
};

A a[] =
{
 (fptr1) 0,
}; // { dg-warning "missing braces around initializer" }

A a2[] =
{
 { (fptr1) 0 }
};