www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12575] New: extern(C) mangling ignored inside mixin template

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

          Issue ID: 12575
           Summary: extern(C) mangling ignored inside mixin template
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: ellery-newcomer utulsa.edu

the code:

mixin template T() {
    extern(C) void fizzle();
}

mixin T!();

void main(){
    fizzle();
}


the [unexpected] fireworks:

$ dmd error3
error3.o: In function `_Dmain':
error3.d:(.text._Dmain+0x5): undefined reference to
`_D6error38__mixin46fizzleUZv'


Was hoping for

undefined reference to `fizzle'

--
Apr 13 2014