[Issue 5739] New: versioned linkage declarations don't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 15 04:55:01 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5739

           Summary: versioned linkage declarations don't work
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid, rejects-valid, wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-03-15 04:51:51 PDT ---
main.d:
=======
import versionextern;

void main()
{
    foo();
}

versionextern.d:
================
version = Bla;

version(Bla)
{
    extern(Windows):
}
else version(Blub)
{
    extern(C):
}
void foo();

yields:
Symbol Undefined _D13versionextern3fooFZv
no matter what version is defined.

removing the parentheses and else:
version(Bla)
    extern(Windows):
version(Blub)
    extern(C):

even results in:
main(5): Error: undefined identifier foo


I'm not sure if this is a rejects-valid or accepts-invalid issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list