Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wvexing-parse2.C

raw
1 // PR c++/25814
2 // { dg-do compile { target c++11 } }
3 // Test -Wvexing-parse. C++11 features.
4
5 struct X { };
6 struct T {
7 T(X);
8 };
9
10 void
11 fn1 (double (a))
12 {
13 auto l = [](){
14 int f(int(a)); // { dg-warning "parentheses were disambiguated as a function declaration" }
15 };
16
17 [[noreturn]] int(e)(); // { dg-warning "empty parentheses were disambiguated as a function declaration" }
18
19 T t1{X()};
20 T t2(X{});
21 T t3{X{}};
22
23 using U = int();
24 }