<div dir="ltr"><div>Is there way to declare a extern(C) function inside a function without altering the mangled name?<br></div><div><br></div><div>Should I write a mixin for that based on pragma(mangleof) (used as extern_C_global_scope in example below) ? Or did someone already implement that? </div><div><br></div><div>extern(C) void foo1();</div><div>void fun(){</div><div>extern(C) void foo2();</div><div>mixin(extern_C_global_scope("void foo3()"));</div><div>foo1(); //OK<br></div><div>foo2();  //will result in link error due to different mangling of foo2.</div><div>foo3();  //OK</div><div>}<br></div><div><br></div><div><br></div></div>