aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/anon7.C
blob: b1b70e10b121bbee300e1ecb91c573f6643048d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c++/34094
// { dg-do compile }

namespace
{
  struct A {
    static int bar ();		// { dg-error "used but never defined" }
    static int i;		// { dg-error "used, but not defined" "" { xfail *-*-* } }
    static int j;
    static int k;
    static int l;
    static const int m = 16;
    static const int n = 17;
  };
  int A::j = 4;
  int A::k;
  const int A::m;
}

int foo (void)
{
  return A::i + A::j + A::k + A::m + A::n + A::bar ();
}