]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.dg/attr_visibility3.d
d: Add `@visibility' and `@hidden' attributes.
[thirdparty/gcc.git] / gcc / testsuite / gdc.dg / attr_visibility3.d
1 // { dg-do compile }
2 // { dg-require-visibility "" }
3 // { dg-require-dll "" }
4
5 import gcc.attributes;
6
7 @visibility("hidden")
8 export void func1(); // { dg-error ".func1. was declared .export." }
9
10 @visibility("hidden")
11 export void func2() { } // { dg-error ".func2. was declared .export." }
12
13 @visibility("default")
14 export void func3();
15
16 @visibility("default")
17 export void func4() { };
18
19 @visibility("hidden")
20 export struct type1 { } // { dg-error ".type1. was declared .export." }
21
22 @visibility("default")
23 export struct type2 { }
24
25 @visibility("hidden")
26 export class type3 { } // { dg-error ".type3. was declared .export." }
27
28 @visibility("default")
29 export class type4 { }