https://issues.dlang.org/show_bug.cgi?id=20012
--- Comment #3 from Walter Bright <[email protected]> --- Is it? Note the same behavior happens with: struct S { extern (C) void foo() { } } i.e. foo() gets mangled. There are two aspects of C mangling - one is the ABI, the other is the ABI. Using C mangling in a scope means there can be only one, so D just uses it to set the ABI. But there's another way you can do it: mixin template M() { export extern(C) pragma(mangle, "fun") void fun() {} } mixin M!(); which will work. --
