https://issues.dlang.org/show_bug.cgi?id=24509
Issue ID: 24509 Summary: importC cannot handle _stdcall Function Calling Convention with single heading underscore Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: afer...@gmail.com In Windows programming, the stdcall calling convention is usually specified using the __stdcall keyword or macro. The import c documentation also lists __stdcall calling convention with double underscores. However, there are some occurrences in c library headers using single underscores. For instance, Microsoft's onnx runtime [1]. This kind of usage is not handled with importc. Importc yields a syntax error for these situations, such as: onnxruntime_c_api.h(288,25): Error: expected identifier for declarator onnxruntime_c_api.h(288,25): Error: `;` or `,` expected 1: https://github.com/microsoft/onnxruntime/blob/08d208b969fec6e7f6505f4f468eea0d6a9031c2/include/onnxruntime/core/session/onnxruntime_c_api.h#L86 --