While programming, sometimes you get into a state of mind where you’re somehow incapable of seeing an obvious mistake that you’ve made. I think I’m in that state now. For the life of me I can’t figure out why the following code is doing what it’s doing:
I’ve tested this code in ppc64le, riscv64, arm32, and ia32. Not getting the expected result in any of them. I’m pretty sure there’s something wrong with the code but I not seeing it. I’m hoping a fresh pair of eyes can help me here.
The code in question is for a test case. I can’t switch the type since that’s the very thing I’m testing. The call to ns.function() is supposed to establish the control for the test. I’m comparing the result to what I get from my dynamic dispatch mechanism. Funny thing is that my stuff seems to produce the right results but I can’t get the control to work.
Edit: by “not connected to C primitives” I meant the first parameter of a variadic function. But @cVaArg type should be a C non-fixed width integer or f64.