I've only been using Xcode for a couple of days, so I'm not very proficient at using the debugger, but I'll try to narrow down where it's going wrong.
Edit: Yep 64 bit works fine.
Edit2: After some more digging around, it appears that the constructor is not returning a NULL pointer, and the value of retQW immediately after calling
retQW = CallCDeclFunctionQWord(args, paramSize<<2, (size_t)func);is not 0, but if I print the value just outside the switch statement, it is 0.
This might be due to some code being optimised away, but this seems to be where the pointer becomes null.
Edit3: Kinda got it working, if I make retQW volatile it seems to prevent optimisations enough for it to work. This is using the GCC 4.2 compiler.