OSDN Git Service

(va_start, stdarg case): Call __builtin_next_arg, and ignore the
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Oct 1995 16:21:26 +0000 (16:21 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Oct 1995 16:21:26 +0000 (16:21 +0000)
result, so that the compiler can report the proper error, if the
second argument is not the last argument.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10424 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ginclude/va-ppc.h

index 666e259..9406574 100644 (file)
@@ -70,7 +70,10 @@ __extension__ ({                                                     \
 
 #ifdef _STDARG_H /* stdarg.h support */
 
-#define va_start(AP,LASTARG) __va_start_common (AP, 0)
+/* Calling __builtin_next_arg gives the proper error message if LASTARG is
+   not indeed the last argument.  */
+#define va_start(AP,LASTARG) \
+  (__builtin_next_arg (LASTARG), __va_start_common (AP, 0))
 
 #else /* varargs.h support */