aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-10-03 12:21:26 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-10-03 12:21:26 -0400
commit3e8f1dc0af016ca71e72eecaf7d58bfc2beac36f (patch)
tree327e5c04b61205b41984477b2e980b5f76d7ed7a /gcc
parentc8465d7089fea32466f5361dcb0a295af87d5453 (diff)
downloadgcc-3e8f1dc0af016ca71e72eecaf7d58bfc2beac36f.zip
gcc-3e8f1dc0af016ca71e72eecaf7d58bfc2beac36f.tar.gz
gcc-3e8f1dc0af016ca71e72eecaf7d58bfc2beac36f.tar.bz2
(va_start...
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ginclude/va-ppc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ginclude/va-ppc.h b/gcc/ginclude/va-ppc.h
index 666e259..9406574 100644
--- a/gcc/ginclude/va-ppc.h
+++ b/gcc/ginclude/va-ppc.h
@@ -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 */