[Issue 12894] New: Make extern(Windows) behave like extern(C) on non-Windows systems

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 11 15:15:25 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12894

          Issue ID: 12894
           Summary: Make extern(Windows) behave like extern(C) on
                    non-Windows systems
           Product: D
           Version: D1 & D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

Currently,

    extern (Windows) int foo(int a, int b);

mangles on non-Windows systems as:

    foo at 16

This doesn't really make any sense or have any use. It is not compatible with
anything.

I propose changing it to behave like extern(C). This has the advantage that
there is significant C code out there that mangles with Windows on Windows and
otherwise C, and this will make these sorts of things easily compatible with D
declarations.

It will require recompiling of any non-Windows libraries that use
extern(Windows).

--


More information about the Digitalmars-d-bugs mailing list