Are there any re-entrancy issues using
va_start
va_arg
va_end
calling a variable argument function from another variable argument function? Can they collide and cause problems?
Are there any re-entrancy issues using
va_start
va_arg
va_end
calling a variable argument function from another variable argument function? Can they collide and cause problems?
None that I am aware of.
Variable argument function calls happen just like any other and the arguments are passed in the same manner. It is just up to the programmer to determine how many and what kind of variables have been passed.
To be more specific, while I understand how to use va_start and va_arg, I'm not sure what they're doing under the hood.
Is it a problem to launch another variable argument function right in the middle of a va_start, va_arg routine, before va_end is called? The new function will start it's own va_start, va_arg routine.
>I'm not sure what they're doing under the hood.
Something implementation dependent.
>Is it a problem to launch another variable argument function right in the middle of a va_start, va_arg routine, before va_end is called?
No.
My best code is written with the delete key.