pragma mangle on extern(C) in function body

Sebastiaan Koppe mail at skoppe.eu
Wed Jan 16 19:41:04 UTC 2019


While it is perfectly ok to define an extern(C) function in a 
function method, I can't seem to get pragma(mangle, "...") on it 
to work.

---
pragma(mangle, "Foo")    // Ok
extern(C) void foo();

void main() {
     pragma(mangle, "Bar")    // Error....
     extern(C) void bar();
}
---

Any idea why?


More information about the Digitalmars-d-learn mailing list