mirror of
https://github.com/dlang/dmd.git
synced 2025-04-28 06:00:13 +03:00

* ImportC: add more support for naked, dllimport, dllexport * ImportC: support dllimport, dllexport, naked attributes
31 lines
750 B
OpenEdge ABL
31 lines
750 B
OpenEdge ABL
/* Smoke test dllimport, dllexport, and naked attributes */
|
|
|
|
__declspec(dllimport) int abc;
|
|
|
|
__declspec(dllimport) int def();
|
|
|
|
__declspec(dllexport) int ghi() { return 3; }
|
|
|
|
__declspec(dllexport) int jkl;
|
|
|
|
__declspec(naked) __declspec(dllexport)
|
|
int test(int a, int b, int c, int d, int e, int f)
|
|
{
|
|
return a + b + c + d + e + f + abc + def() + ghi() + jkl;
|
|
}
|
|
|
|
/*****************************************/
|
|
|
|
__attribute__((dllimport)) int abcx;
|
|
|
|
__attribute__((dllimport)) int defx();
|
|
|
|
__attribute__((dllexport)) int ghix() { return 3; }
|
|
|
|
__attribute__((dllexport)) int jklx;
|
|
|
|
__attribute__((naked)) __attribute__((dllexport))
|
|
int testx(int a, int b, int c, int d, int e, int f)
|
|
{
|
|
return a + b + c + d + e + f + abcx + defx() + ghix() + jklx;
|
|
}
|