view gcc/testsuite/g++.dg/ext/visibility/anon7.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// 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 ();
}