aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/const12.C
blob: 2f6f9b280fb5d2b385ede5dd1b1e41fc08c0dfee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/69688
// { dg-do compile }
// { dg-options "-Wsign-compare" }

struct S
{
  static const int s;
  static const char c[];
  static wchar_t w[];

  S ()
    {
      for (int i = 0; i < s; i++)
	w[i] = 0;
    }
};

const char S::c[] = "x";
const int S::s = sizeof (S::c) - 1;
wchar_t S::w[S::s];