OSDN Git Service

* parser.c (cp_parser_class_specifier): Set class location to that
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.jason / local.C
1 // { dg-do assemble  }
2 // General testcase for local classes.
3
4 int x;
5 void f ()
6 {
7   static int s;
8   int x;                        // { dg-error "" } referenced below
9   extern int q();
10
11   struct local {
12     int g() { return x; }       // { dg-error "" } automatic variable
13     int h() { return s; }       // { dg-bogus "" } local class
14     int k() { return ::x; }     // OK
15     int l() { return q(); }     // OK
16     int m();                    // OK - not defined
17     static int foo;             // { dg-error "" } static data member of local class
18   };
19 }
20
21 local* p = 0;                   // { dg-error "" } no such type in scope