www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23545] New: export int a; should generate dllexport, not

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

          Issue ID: 23545
           Summary: export int a; should generate dllexport, not dllimport
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

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 --
Dec 09 2022