[Issue 23545] New: export int a; should generate dllexport, not dllimport
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Dec 10 02:52:47 UTC 2022
    
    
  
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 at puremagic.com
          Reporter: bugzilla at 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
--
    
    
More information about the Digitalmars-d-bugs
mailing list