There is no such error in DMD, but ldc has one:
source\api.d(6,5): Error: Function type does not match previously declared function with the same mangled name: `_D3api8testFuncFiiZi`
source\api.d(6,5): Previous IR type: void ()
source\api.d(6,5): New IR type: i32 (i32, i32)
I have a .di with declarations, and a separate module that generates stub functions and global pointers from them:
__gshared extern(C) static void* dpford_funcp_DMANGLE;
pragma(mangle, "DMANGLE")
void dpford_func_DMANGLE() {
asm{
naked;
jmp dpford_funcp_DMANGLE;
}
}
I VERY and VERY DO NOT WANT to generate a function body with the help of traits. I tried with ldc.attributes.naked but the same thing happens.