[Bug c/50581] stdarg doesn't support array types
Wolfgang at Solfrank dot net
gcc-bugzilla@gcc.gnu.org
Sat Oct 1 14:43:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50581
--- Comment #4 from Wolfgang at Solfrank dot net 2011-10-01 14:43:32 UTC ---
(In reply to comment #3)
Thanks for the insight regarding passing arrays by value in C90, I wasn't even
aware of that.
However:
> Passing va_list as a function argument is generally hard, whether or not
> variadic, since you don't know whether it will be passed by reference or
> by value or what the type of the address of a va_list parameter will be.
> Portable code needs to pass a pointer to va_list or a structure containing
> va_list or use some other such means of avoiding dependence on whether
> va_list is an array.
Huh? What about vprintf and friends? They are defined to take a va_list as
their last parameter.
More information about the Gcc-bugs
mailing list