2 // { dg-options "-Wreturn-type" }
3 // GROUPS passed error-reporting
5 // DR 295 allows qualification via typedef
12 template <int (*F) (int)>
21 operator int () { return a; }
24 extern "C" int atoi (const char *);
26 int (*fee)(const char *) = atoi;
27 int (**bar)(const char *) = &fee;
31 const char*** spp = &sp;
33 int foo (int a = (**bar) (s))
35 return doowop<foo>::bar; // { dg-error "" } not a member
38 int foo2 (int (*a)(int) = &foo)
40 undef4 (1); // { dg-error "" } implicit declaration
45 class Y{}; // { dg-error "" } private
48 typedef int const * bart ();
49 //The following is DR295 dependant
50 typedef bart const * const * bar2;
51 typedef bart volatile * const * bar2v;
53 bar2 baz (X::Y y) // { dg-error "" } in this context
55 X::Y f; // { dg-error "" } in this context
58 undef2 (1); // { dg-error "" } implicit declaration
65 static int ninny2 () { return badoo<'\001'>::foo; } // { dg-error "" } not a member
73 undef3 (1); // { dg-error "" } implicit declaration