summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/visibility3.C
blob: 64d64df647f159b14874cf510956330233fd007b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do assemble  }
// GROUPS passed visibility
// visibility file
// From: kol@world.std.com (Nikolay Yatsenko)
// Date:     Wed, 27 Jan 1993 16:39:00 -0500
// Subject:  g++ bug
// Message-ID: <199301272139.AA25442@world.std.com>

int x;

int main(void)
{
  static int s;
  int x; // { dg-error "" } declared
  extern int g();

  struct local {
    int g() { return x; }   // illegal (non-static x); g++ does not give error// { dg-error "" } 
    int h() { return s; }   // ok, but g++ give error
  };
  return 0;
}