Commit 17bbab26 by Richard Kenner

(expand_builtin): Allow builtin_next_arg for varargs functions as

well.

From-SVN: r6984
parent 3b69d50e
...@@ -6957,8 +6957,7 @@ expand_builtin (exp, target, subtarget, mode, ignore) ...@@ -6957,8 +6957,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
#endif #endif
} }
/* Return the address of the first anonymous stack arg. /* Return the address of the first anonymous stack arg. */
This should only be used for stdarg functions. */
case BUILT_IN_NEXT_ARG: case BUILT_IN_NEXT_ARG:
{ {
tree fntype = TREE_TYPE (current_function_decl); tree fntype = TREE_TYPE (current_function_decl);
...@@ -6967,7 +6966,8 @@ expand_builtin (exp, target, subtarget, mode, ignore) ...@@ -6967,7 +6966,8 @@ expand_builtin (exp, target, subtarget, mode, ignore)
if (TYPE_ARG_TYPES (fntype) == 0 if (TYPE_ARG_TYPES (fntype) == 0
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype))) || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
== void_type_node)) == void_type_node)
|| current_function_varargs)
{ {
error ("`va_start' used in function with fixed args"); error ("`va_start' used in function with fixed args");
return const0_rtx; return const0_rtx;
......
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