The run-time system won't allow your code to call a C function/procedure with more than 9 arguments, but the front end should detect the situation when your application defines such a C routine.
Currently, the program crashes at run-time if it actually attempts to call a C routine with 10 or more arguments, but it would be better if this was caught during front-end parsing instead because that way the coder will get to see the source code line number during testing. The current message might not be seen during testing and only reported by your irate customer instead.
The code here will run unless you actually call 'DC'.
include std/dll.e
constant lib = open_dll("dllname")
constant DC = define_c_func( lib, "somename", {C_INT, C_INT, C_INT, C_INT, C_INT,
C_INT, C_INT, C_INT, C_INT, C_INT},
C_INT)
I withdraw this ticket. I misunderstood the C calling subsystem. I can see now it can cater for any number of arguments, and its only callback routines that are restricted to nine arguments.
The unlimited number of arguments is really only for x86, where we use inlined ASM to push arguments. Other architectures use different calling conventions, and there we support up to 15 arguments.