summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/pragma.C
blob: 98384c9c42ae7615c024e14457ba97d2142d7a03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Test that #pragma GCC visibility affects class members. */
/* { dg-do compile } */
/* { dg-require-visibility "" } */
/* { dg-final { scan-hidden "_ZN3Foo6methodEv" } } */

#pragma GCC visibility push(hidden)
class Foo
{
  void method();
};
#pragma GCC visibility pop

void Foo::method() { }