When compiling the test with `gcc -std=c11 -fsyntax-only`
compilable/test22727.c:5:10: error: expected ‘;’ before ‘int’
5 | __stdcall int foostdcall(int a) { return a; }
| ^~~~
| ;
compilable/test22727.c:7:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘foostdcall2’
7 | int __stdcall foostdcall2(int a) { return a; }
| ^~~~~~~~~~~
compilable/test22727.c:9:16: error: expected declaration specifiers or ‘...’ before ‘*’ token
9 | int __stdcall (*fp1)(int a) = &foostdcall;
| ^
compilable/test22727.c:11:15: error: expected ‘)’ before ‘*’ token
11 | int (__stdcall *fp2)(int a) = &foostdcall2;
| ^~
| )
Original test content
```
// https://issues.dlang.org/show_bug.cgi?id=22727
int fooc(int a) { return a; }
__stdcall int foostdcall(int a) { return a; }
int __stdcall foostdcall2(int a) { return a; }
int __stdcall (*fp1)(int a) = &foostdcall;
int (__stdcall *fp2)(int a) = &foostdcall2;
```
Comment #1 by bugzilla — 2023-02-20T06:57:47Z
__stdcall is a Microsoft and Digital Mars C extension.
Comment #2 by ibuclaw — 2023-02-20T11:04:08Z
(In reply to Walter Bright from comment #1)
> __stdcall is a Microsoft and Digital Mars C extension.
Then it needs documenting under both MSVC and/or DMC sections of the importC page.
https://dlang.org/spec/importc.html#visualc-extensions
Comment #3 by dlang-bot — 2023-04-10T18:07:05Z
@WalterBright created dlang/dlang.org pull request #3580 "fix Issue 23698 - ImportC: __stdcall is not documented as supported M…" fixing this issue:
- fix Issue 23698 - ImportC: __stdcall is not documented as supported MSVC/DMC extensions
https://github.com/dlang/dlang.org/pull/3580
Comment #4 by dlang-bot — 2023-04-14T11:27:42Z
dlang/dlang.org pull request #3580 "fix Issue 23698 - ImportC: __stdcall is not documented as supported M…" was merged into master:
- 2ed7f3326702de307617e8045ff50a112bca51d4 by Walter Bright:
fix Issue 23698 - ImportC: __stdcall is not documented as supported MSVC/DMC extensions
https://github.com/dlang/dlang.org/pull/3580