extern(C) declaration inside function

"Luís "Luís
Tue Sep 10 06:41:13 PDT 2013


When you declare an extern(C) function inside a D function it 
seems to continue to use D's name mangling, which is unexpected 
for me. For instance:

     void main()
     {
         extern(C) void foo(int);
         foo(42);
     }

     Undefined symbols for architecture x86_64:
       "__D4test4mainFZv3fooUiZv", referenced from:
             __Dmain in test.o

Is this a bug?


More information about the Digitalmars-d mailing list