]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
(va_start...
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 3 Oct 1995 16:21:26 +0000 (12:21 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 3 Oct 1995 16:21:26 +0000 (12:21 -0400)
(va_start, stdarg case): Call __builtin_next_arg, and ignore the
result, so that the compiler can report the proper error, if the
second argument is not the last argument.

From-SVN: r10424

gcc/ginclude/va-ppc.h

index 666e259aa64f69b825e3f983b278845a76dbce94..940657483c381a6c9802d8d14473e5a1b5619455 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 */