aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-04-06 07:48:06 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-04-06 07:48:06 -0400
commit17bbab26bbe9481fda74e2f6ccfd68ff5842774b (patch)
treeb7c89d48a7a401baed37d9b699bab128ac35b48d
parent3b69d50e4d2746d462dc656e44a6f8c872daf943 (diff)
downloadgcc-17bbab26bbe9481fda74e2f6ccfd68ff5842774b.zip
gcc-17bbab26bbe9481fda74e2f6ccfd68ff5842774b.tar.gz
gcc-17bbab26bbe9481fda74e2f6ccfd68ff5842774b.tar.bz2
(expand_builtin): Allow builtin_next_arg for varargs functions as
well. From-SVN: r6984
-rw-r--r--gcc/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index a825d26..6339b45 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6957,8 +6957,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
#endif
}
- /* Return the address of the first anonymous stack arg.
- This should only be used for stdarg functions. */
+ /* Return the address of the first anonymous stack arg. */
case BUILT_IN_NEXT_ARG:
{
tree fntype = TREE_TYPE (current_function_decl);
@@ -6967,7 +6966,8 @@ expand_builtin (exp, target, subtarget, mode, ignore)
if (TYPE_ARG_TYPES (fntype) == 0
|| (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");
return const0_rtx;