Bug 23545 – export int a; should generate dllexport, not dllimport

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2022-12-10T02:52:47Z
Last change time
2023-02-08T00:27:49Z
Keywords
dll, pull
Assigned to
No Owner
Creator
Walter Bright
See also
https://issues.dlang.org/show_bug.cgi?id=9816

Comments

Comment #0 by bugzilla — 2022-12-10T02:52:47Z
From https://issues.dlang.org/show_bug.cgi?id=9816#c19 : There are some problems with the current implementation. export void foo() {} // definition => dllexport export void foo(); // declaration => dllimport export int a = 0; // definition => dllexport export int a; // declaration => dllimport // fails because it's actually a definition export extern int a; // declaration => dllimport
Comment #1 by dlang-bot — 2022-12-10T03:23:22Z
@WalterBright created dlang/dmd pull request #14680 "fix Issue 23545 - export int a; should generate dllexport, not dllimport" fixing this issue: - fix Issue 23545 - export int a; should generate dllexport, not dllimport https://github.com/dlang/dmd/pull/14680
Comment #2 by dlang-bot — 2023-02-08T00:27:49Z
dlang/dmd pull request #14680 "fix Issue 23545 - export int a; should generate dllexport, not dllimport" was merged into master: - ea945fe1843aae88ddc45c82d7218f045a752110 by Walter Bright: fix Issue 23545 - export int a; should generate dllexport, not dllimport https://github.com/dlang/dmd/pull/14680