April 19 [Issue 24511] New: __stdcall functions from C are extern(C) in D. | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24511 Issue ID: 24511 Summary: __stdcall functions from C are extern(C) in D. Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Keywords: ImportC Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: contact@harrygillanders.com __stdcall functions and function-pointer types imported into D from a C file are extern(C) instead of extern(Windows). A brief test-case: > // c.c > void __stdcall stdcallFunction() > {} > // d.d > import c; > // This should hold true, but it fails. > static assert(__traits(getLinkage, stdcallFunction) == "Windows"); I would expect __stdcall functions to be extern(Windows). -- |
Copyright © 1999-2021 by the D Language Foundation