aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ext/anon-struct6.C
blob: 66d4b32719621c37067b7c85e0f8ed0268e238be (plain)
1
2
3
4
5
6
7
8
9
10
// PR c++/33460

struct A
{
  struct
  {  // { dg-error "anonymous struct cannot have function members" }
    struct { static int i; }; // { dg-error "prohibits anonymous structs|non-static data members|unnamed class" }
    void foo() { i; }
  }; // { dg-error "prohibits anonymous structs" }
};