1 // { dg-additional-options -Wparentheses }
3 // Most Vexing Parse warnings
4 // in C++ anythig that syntactically looks like a decl IS a decl, this
5 // can lead to confused users, but worse silent unexpectedly unsafe
8 int (a); // { dg-warning "" }
9 int (*b); // { dg-warning "" }
10 extern int (&c); // { dg-warning "" }
20 int (d1 ()); // { dg-warning "" }
21 int (d2 // { dg-warning "" }
24 int g (int (a)); // No warning because ...
25 H h (int (h1), int (h2), 3); // ... not a function decl.
33 int (d1[1]); // { dg-warning "" }
43 int ((*c1())[1]); // { dg-warning "" }
46 int ((*d1[1])()); // { dg-warning "" }
47 int ((*d2[1]) // { dg-warning "" }
53 typedef int shared_mutex; // for exposition
62 shared_mutex mutex; // not a real mutex type
66 void not_thread_safe ()
68 locker (mutex); // { dg-warning "" }