OSDN Git Service

Initial revision
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.jason / report.C
1 // Build don't link: 
2 // GROUPS passed error-reporting
3 template <char C>
4 class badoo
5 {
6 };
7
8 template <int (*F) (int)>
9 class doowop
10 {
11 };
12
13 struct A
14 {
15   int a;
16   ~A () { a = 0; }
17   operator int () { return a; }
18 };
19
20 extern "C" int atoi (char *);
21
22 int (*fee)(char *) = atoi;
23 int (**bar)(char *) = &fee;
24
25 char *s = "4";
26 char **sp = &s;
27 char ***spp = &sp;
28
29 int foo (int a = (**bar) (s))
30 {
31    return doowop<foo>::bar; // ERROR - not a member
32 } // ERROR - non-void
33
34 int foo2 (int (*a)(int) = &foo)
35 {
36    undef4 (1); // ERROR - implicit declaration
37   return 1;
38 }
39
40 class X{
41   class Y{};
42 };
43
44 typedef int const * bart ();
45 typedef bart const * const * bar2;
46
47 bar2 baz (X::Y y)
48 {
49   X::Y f;
50   bar2 wa [5];
51   wa[0] = baz(f);
52   undef2 (1); // ERROR - implicit declaration
53 } // ERROR - non-void
54
55 int ninny ()
56 {
57   struct A
58     {
59           static int ninny2 () { return badoo<'\001'>::foo; } // ERROR - not a member
60     };
61
62   return A::ninny2();
63 }
64
65 int darg (char X::*p)
66 {
67    undef3 (1); // ERROR - implicit declaration
68 } // ERROR - non-void