D-Programming-Language/dmd — pull request #4092 by Trass3r (2014-10-26 21:18:48+00:00)
Title: fix extern(D) calling convention

http://forum.dlang.org/thread/zogygbvfszssudpaejwo@forum.dlang.org

Merely a quick sketch. Feel free to suggest a clean way.
Follows typfunc model with additional check where it's used (cod1.c funccall).
In cv4_func there's no such check so I don't know.