aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi7.C
blob: 4b08474aaf954b2eb772d9c36b3bd7d9115ad200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/53594
// { dg-do compile { target c++11 } }
// { dg-options "-Wuninitialized" }

struct A
{
  const int a = 6;	// { dg-bogus "non-static const member" }
  static int b;
  int &c = b;		// { dg-bogus "non-static reference" }
};

struct B
{
  const int d;		// { dg-warning "non-static const member" }
  int &e;		// { dg-warning "non-static reference" }
  int f = 7;
};