]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/parse/error33.C
e3a7166edda718c2fb059c064889e0f81b5e02fb
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / parse / error33.C
1 /* PR c++/37556 */
2 /* { dg-do compile } */
3
4 struct A
5 {
6 void foo();
7 };
8
9 typedef void (A::T)(); /* { dg-error "typedef name may not be a nested" } */
10
11 void bar(T); /* { dg-message "note: declared here" } */
12
13 void baz()
14 {
15 bar(&A::foo); /* { dg-error "too many arguments" } */
16 }