summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/parse/error33.C
blob: e3a7166edda718c2fb059c064889e0f81b5e02fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* PR c++/37556 */
/* { dg-do compile } */

struct A
{
  void foo();
};

typedef void (A::T)(); /* { dg-error "typedef name may not be a nested" } */

void bar(T); /* { dg-message "note: declared here" } */

void baz()
{
  bar(&A::foo); /* { dg-error "too many arguments" } */
}