summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/anon7.C
blob: 0c42ea866f9bcc09ceecb5d25a9ac60dcd505bc6 (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 ();
    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 ();
}