annotate gcc/testsuite/gcc.dg/dll-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* These dllimport and dllexport appearing for a symbol.
kono
parents:
diff changeset
2 The desired behavior is that if both dllimport
kono
parents:
diff changeset
3 and dllexport appear (in either order) the result is dllexport.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 Microsoft's MSVC 2.0 allows dllimport followed by dllexport for variables,
kono
parents:
diff changeset
6 but does not allow dllexport followed by dllimport.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 In C, it's ok to redeclare a variable so this works for variables
kono
parents:
diff changeset
9 and functions. In C++, it only works for functions. */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 /* { dg-require-dll "" } */
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 __declspec (dllimport) int foo1 ();
kono
parents:
diff changeset
14 __declspec (dllexport) int foo1 (); /* { dg-warning "previous dllimport ignored" } */
kono
parents:
diff changeset
15 __declspec (dllexport) int foo2 ();
kono
parents:
diff changeset
16 __declspec (dllimport) int foo2 (); /* { dg-warning "dllimport ignored" } */
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 __declspec (dllimport) int bar1;
kono
parents:
diff changeset
19 __declspec (dllexport) int bar1; /* { dg-warning "previous dllimport ignored" } */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 __declspec (dllexport) int bar2;
kono
parents:
diff changeset
22 __declspec (dllimport) int bar2; /* { dg-warning "dllimport ignored" } */