This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/50581] stdarg doesn't support array types
- From: "Wolfgang at Solfrank dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 01 Oct 2011 14:43:32 +0000
- Subject: [Bug c/50581] stdarg doesn't support array types
- Auto-submitted: auto-generated
- References: <bug-50581-4@http.gcc.gnu.org/bugzilla/>
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.