Commit 3e8f1dc0 by Richard Kenner

(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
parent c8465d70
...@@ -70,7 +70,10 @@ __extension__ ({ \ ...@@ -70,7 +70,10 @@ __extension__ ({ \
#ifdef _STDARG_H /* stdarg.h support */ #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 */ #else /* varargs.h support */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment