Calling a C function with a varargs argument dynamically

前端 未结 10 1400
太阳男子
太阳男子 2020-12-05 11:45

I am programming in C against a third party library (in HP/Mercury Loadrunner) that allows a varargs-style variable size argument list for one of it\'s functions. I want to

10条回答
  •  庸人自扰
    2020-12-05 12:00

    Note: the code is already compiler-dependent (though perhaps not processor-dependent), because the invocation of web_submit_data assumes there that the argument subexpressions in a procedure call are evaluated from left-to-right order, but the C language leaves the order of argument evaluation unspecified.

    See for reference: http://en.wikipedia.org/wiki/Evaluation_strategy#Call_by_value

    So perhaps the non-portable solution is not going to make things significantly worse for you.

提交回复
热议问题