summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/anon-struct6.C
blob: 11a7bbd6076245a482d7905dc532aec3ad53ead2 (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" } 
    void foo() { i; }
  }; // { dg-error "prohibits anonymous structs" }
};