------- Additional Comments From joseph at codesourcery dot com 2004-12-21 19:27 ------- Subject: Re: Assigning to va_list var is valid for va_arg calls but not other cases
On Tue, 21 Dec 2004, pinskia at gcc dot gnu dot org wrote: > Use va_copy as this is invalid c. The compile-time validity depends on whether va_list is an array type (in which case it should be rejected at compile-time) or some other object type (in which case it shouldn't). Copying other than with va_copy is merely undefined behavior at runtime. However, I can't reproduce the original bug report on x86 which would appear to be the target to which it was referring (from the compiler used for comparison). x86-64 does use an array type so the reported behavior would be correct on that target. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19113