www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18965] New: private attribute does not make function private


          Issue ID: 18965
           Summary: private attribute does not make function private when
                    extern(Windows) attribute is used
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Keywords: link-failure
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: ben.stembridge gmail.com

If you have multiple functions with the same name in different modules that
have the attribute extern(Windows) and are marked as private, it will cause a
link error. This also happens with extern(C) linkage

simple example with 2 modules:

module other;
private void test()

module main;
private void test()
int main(string[] argv)
 return 0;

Error 1: Previous Definition Different : _test

this is with  dmd v2.080.0 windows x86

Jun 09 2018