This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] va_copy(va_list, const va_list)
- From: Earl Chew <earl_chew at agilent dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Richard Henderson <rth at redhat dot com>
- Date: Fri, 22 Oct 2004 14:53:18 -0700
- Subject: Re: [PATCH] va_copy(va_list, const va_list)
- References: <41783A98.10105@agilent.com> <20041022191343.GB30088@redhat.com>
Richard Henderson wrote:
Please add a test case as well.
Attached.
Earl
--- /dev/null 2004-10-22 14:50:16.524000000 -0700
+++ gcc-3.4.1/gcc/testsuite/gcc.dg/20041022-1.c 2004-10-22
14:49:33.243603300 -0700
@@ -0,0 +1,14 @@
+/* Verify that va_copy() can successfully copy from const qualified
+ va_list. */
+
+/* { dg-do compile */
+/* { dg-options "-Werror" */
+
+#include <stdarg.h>
+
+void vacopy(const va_list arglist)
+{
+ va_list copylist;
+
+ va_copy(copylist, arglist);
+}