This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: Dump varargs.h


This patch eliminates the GCC-provided <varargs.h> and related code.
It no longer makes sense to provide these things, since traditional
mode compilation has been abandoned.  The total amount of code
strictly for varargs.h was small, but as you can see, it had tentacles
all over the back ends.  I didn't go as far as I could have cleaning
up -- the STRICT_ARGUMENT_NAMING concept is probably now obsolete, for
instance.

You may be wondering why I preserved the first argument to
EXPAND_BUILTIN_VA_START, which is now always 1 and always ignored.
That is because that change would have forced the patch to touch even
more files than it already does.  I mean to do a followup which
converts EXPAND_BUILTIN_VA_{START,ARG,END} to target hooks and
simultaneously eliminates that argument.  That change will be large,
but mechanical and easy to verify, unlike this one.

There is no update for the internals manual, because the section I
should update does not exist.  The instructions for implementing
<stdarg.h> are still for the old (pre-3.0!) mechanism.  I might
document the new mechanism if I get the time.

This has been bootstrapped on i686-linux and I have built cross cc1s
for every affected target.  I am going to do some simulator tests with
--enable-languages=c, too, but I would appreciate testing by people
with actual hardware.  The patch does have a significant risk level.

Query: why is va_start defined as a function-like macro, but not
va_arg and va_end?

zw

	* ginclude/varargs.h: Delete.
	* ginclude/stdarg.h: __builtin_stdarg_start is renamed
          __builtin_va_start.
	* Makefile.in (USER_H): Do not install varargs.h.

	* builtins.def (BUILT_IN_VARARGS_START): Delete.
	(BUILT_IN_STDARG_START): Rename to BUILT_IN_VA_START; rename
	external name to match.
	* builtins.c (expand_builtin_va_start): Eliminate first
	argument and code to implement pre-ISO varargs.
	(std_expand_builtin_va_start): Ignore first argument; it is
	always 1.
	(expand_builtin): Replace BUILT_IN_VARARGS_START and
	BUILT_IN_STDARG_START cases with single BUILT_IN_VA_START case.

	* function.c (assign_parms): Delete hide_last_arg and all
	its uses.
	(mark_varargs): Delete function.
	* function.h (struct function): Delete 'varargs' bit.
	(current_function_varargs): Delete macro.
	* tree.h: Don't declare mark_varargs.

	* c-decl.c (c_function_varargs, c_mark_varargs): Delete.
	(c_expand_body): Don't call mark_varargs.
	* c-objc-common.c: Replace BUILT_IN_VARARGS_START and
	BUILT_IN_STDARG_START cases with single BUILT_IN_VA_START case.
	* c-tree.h: Don't declare c_mark_varargs.
	* c-parse.in: Remove grammar rules for '&...' (which has been
	commented out since before 2.7.2) and for '...' in K+R
	argument declarations.

	* builtins.c, function.c, integrate.c, sibcall.c,
	config/alpha/unicosmk.h, config/arc/arc.c, config/arc/arc.h,
	config/avr/avr.c, config/cris/cris.c, config/fr30/fr30.c,
	config/i960/i960.c, config/i960/i960.md, config/m32r/m32r.c,
	config/m32r/m32r.h, config/m88k/m88k.c, config/m88k/m88k.h,
	config/mips/mips.c, config/mmix/mmix.c, config/mmix/mmix.h,
	config/mn10300/mn10300.c, config/pa/som.h, config/s390/s390.c,
	config/sh/sh.c, config/sh/sh.h, config/sparc/sparc.h,
	config/stormy16/stormy16.c: Delete all references to
	current_function_varargs, and code predicated on that flag.

	* config/alpha/alpha.c (alpha_va_start),
	config/arc/arc.c (arc_va_start),
	config/i386/i386.c (ix86_va_start),
	config/mips/mips.c (mips_va_start),
	config/mn10300/mn10300.c (mn10300_va_start),
	config/rs6000/rs6000.c (rs6000_va_start),
	config/s390/s390.c (s390_va_start),
	config/sh/sh.c (sh_va_start),
	Ignore first argument; it is always 1.

	* config/c4x/c4x-protos.h, config/c4x/c4x.c: Delete c4x_va_start. 
	* config/ia64/ia64-protos.h, config/ia64/ia64.c: Delete ia64_va_start.
	* config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c:
	Delete m68hc11_va_start.
	* config/c4x/c4x.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h:
	No need to define EXPAND_BUILTIN_VA_START.

	* doc/invoke.texi, doc/sourcebuild.texi, doc/tm.texi,
	doc/trouble.texi: Remove references to GCC-provided <varargs.h>.

testsuite:
	* c-torture/execute/991216-3.c, c-torture/execute/strct-varg-1.c,
	c-torture/execute/va-arg-7.c, c-torture/execute/va-arg-8.c,
	c-torture/execute/va-arg-15.c, c-torture/execute/va-arg-16.c,
	c-torture/execute/va-arg-17.c, c-torture/execute/va-arg-19.c:
	Convert to use <stdarg.h>.
	* c-torture/execute/va-arg-3.c, c-torture/execute/va-arg-3.x:
	Delete.
	* lib/gcc.exp, lib/objc.exp: Remove code to set -DNO_VARARGS.


===================================================================
Index: Makefile.in
--- Makefile.in	25 Jun 2002 01:58:06 -0000	1.906
+++ Makefile.in	28 Jun 2002 06:19:57 -0000
@@ -161,7 +161,6 @@ INSTALL_HEADERS_DIR = @build_install_hea
 # Header files that are made available under the same name
 # to programs compiled with GCC.
 USER_H = $(srcdir)/ginclude/stdarg.h $(srcdir)/ginclude/stddef.h \
-    $(srcdir)/ginclude/varargs.h \
     $(srcdir)/ginclude/stdbool.h $(srcdir)/ginclude/iso646.h \
     $(EXTRA_HEADERS)
 
===================================================================
Index: builtins.c
--- builtins.c	11 Jun 2002 12:21:26 -0000	1.152
+++ builtins.c	28 Jun 2002 06:19:58 -0000
@@ -98,7 +98,7 @@ static rtx expand_builtin_mathfn	PARAMS 
 static rtx expand_builtin_constant_p	PARAMS ((tree));
 static rtx expand_builtin_args_info	PARAMS ((tree));
 static rtx expand_builtin_next_arg	PARAMS ((tree));
-static rtx expand_builtin_va_start	PARAMS ((int, tree));
+static rtx expand_builtin_va_start	PARAMS ((tree));
 static rtx expand_builtin_va_end	PARAMS ((tree));
 static rtx expand_builtin_va_copy	PARAMS ((tree));
 static rtx expand_builtin_memcmp	PARAMS ((tree, tree, rtx,
@@ -2900,10 +2900,9 @@ expand_builtin_next_arg (arglist)
 {
   tree fntype = TREE_TYPE (current_function_decl);
 
-  if ((TYPE_ARG_TYPES (fntype) == 0
-       || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
-	   == void_type_node))
-      && ! current_function_varargs)
+  if (TYPE_ARG_TYPES (fntype) == 0
+      || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
+	  == void_type_node))
     {
       error ("`va_start' used in function with fixed args");
       return const0_rtx;
@@ -2926,7 +2925,7 @@ expand_builtin_next_arg (arglist)
       if (arg != last_parm)
 	warning ("second parameter of `va_start' not last named argument");
     }
-  else if (! current_function_varargs)
+  else
     /* Evidently an out of date version of <stdarg.h>; can't validate
        va_start's second argument, but can still work as intended.  */
     warning ("`__builtin_next_arg' called without an argument");
@@ -2991,24 +2990,12 @@ stabilize_va_list (valist, needs_lvalue)
 
 void
 std_expand_builtin_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg;
 {
   tree t;
 
-  if (! stdarg_p)
-    {
-      /* The dummy named parameter is declared as a 'word' sized
-	 object, but if a 'word' is smaller than an 'int', it would
-	 have been promoted to int when it was added to the arglist.  */
-      int align = PARM_BOUNDARY / BITS_PER_UNIT;
-      int size = MAX (UNITS_PER_WORD,
-		      GET_MODE_SIZE (TYPE_MODE (integer_type_node)));
-      int offset = ((size + align - 1) / align) * align;
-      nextarg = plus_constant (nextarg, -offset);
-    }
-
   t = build (MODIFY_EXPR, TREE_TYPE (valist), valist,
 	     make_tree (ptr_type_node, nextarg));
   TREE_SIDE_EFFECTS (t) = 1;
@@ -3016,31 +3003,27 @@ std_expand_builtin_va_start (stdarg_p, v
   expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
 }
 
-/* Expand ARGLIST, which from a call to __builtin_stdarg_va_start or
-   __builtin_varargs_va_start, depending on STDARG_P.  */
+/* Expand ARGLIST, from a call to __builtin_va_start.  */
 
 static rtx
-expand_builtin_va_start (stdarg_p, arglist)
-     int stdarg_p;
+expand_builtin_va_start (arglist)
      tree arglist;
 {
   rtx nextarg;
-  tree chain = arglist, valist;
+  tree chain, valist;
 
-  if (stdarg_p)
-    nextarg = expand_builtin_next_arg (chain = TREE_CHAIN (arglist));
-  else
-    nextarg = expand_builtin_next_arg (NULL_TREE);
+  chain = TREE_CHAIN (arglist);
 
   if (TREE_CHAIN (chain))
     error ("too many arguments to function `va_start'");
 
+  nextarg = expand_builtin_next_arg (chain);
   valist = stabilize_va_list (TREE_VALUE (arglist), 1);
 
 #ifdef EXPAND_BUILTIN_VA_START
-  EXPAND_BUILTIN_VA_START (stdarg_p, valist, nextarg);
+  EXPAND_BUILTIN_VA_START (1, valist, nextarg);
 #else
-  std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+  std_expand_builtin_va_start (1, valist, nextarg);
 #endif
 
   return const0_rtx;
@@ -4030,10 +4013,8 @@ expand_builtin (exp, target, subtarget, 
     case BUILT_IN_EH_RETURN_DATA_REGNO:
       return expand_builtin_eh_return_data_regno (arglist);
 #endif
-    case BUILT_IN_VARARGS_START:
-      return expand_builtin_va_start (0, arglist);
-    case BUILT_IN_STDARG_START:
-      return expand_builtin_va_start (1, arglist);
+    case BUILT_IN_VA_START:
+      return expand_builtin_va_start (arglist);
     case BUILT_IN_VA_END:
       return expand_builtin_va_end (arglist);
     case BUILT_IN_VA_COPY:
===================================================================
Index: builtins.def
--- builtins.def	27 Feb 2002 18:46:57 -0000	1.29
+++ builtins.def	28 Jun 2002 06:19:58 -0000
@@ -465,11 +465,8 @@ DEF_GCC_BUILTIN(BUILT_IN_EH_RETURN_DATA_
 		"__builtin_eh_return_data_regno",
 		BT_FN_INT_INT)
 
-DEF_GCC_BUILTIN(BUILT_IN_VARARGS_START,
-		"__builtin_varargs_start",
-		BT_FN_VOID_VALIST_REF)
-DEF_GCC_BUILTIN(BUILT_IN_STDARG_START,
-		"__builtin_stdarg_start",
+DEF_GCC_BUILTIN(BUILT_IN_VA_START,
+		"__builtin_va_start",
 		BT_FN_VOID_VALIST_REF_VAR)
 DEF_GCC_BUILTIN(BUILT_IN_VA_END,
 		"__builtin_va_end",
@@ -477,6 +474,7 @@ DEF_GCC_BUILTIN(BUILT_IN_VA_END,
 DEF_GCC_BUILTIN(BUILT_IN_VA_COPY,
 		"__builtin_va_copy",
 		BT_FN_VOID_VALIST_REF_VALIST_ARG)
+
 DEF_GCC_BUILTIN(BUILT_IN_EXPECT,
 		"__builtin_expect",
 		BT_FN_LONG_LONG_LONG)
===================================================================
Index: c-decl.c
--- c-decl.c	20 Jun 2002 17:37:51 -0000	1.335
+++ c-decl.c	28 Jun 2002 06:20:00 -0000
@@ -119,11 +119,6 @@ static GTY(()) tree named_labels;
 
 static GTY(()) tree shadowed_labels;
 
-/* Nonzero when store_parm_decls is called indicates a varargs function.
-   Value not meaningful after store_parm_decls.  */
-
-static int c_function_varargs;
-
 /* Set to 0 at beginning of a function definition, set to 1 if
    a return statement that specifies a return value is seen.  */
 
@@ -6027,7 +6022,6 @@ start_function (declspecs, declarator, a
   current_function_returns_abnormally = 0;
   warn_about_return_type = 0;
   current_extern_inline = 0;
-  c_function_varargs = 0;
   named_labels = 0;
   shadowed_labels = 0;
 
@@ -6246,16 +6240,6 @@ start_function (declspecs, declarator, a
   
   return 1;
 }
-
-/* Record that this function is going to be a varargs function.
-   This is called before store_parm_decls, which is too early
-   to call mark_varargs directly.  */
-
-void
-c_mark_varargs ()
-{
-  c_function_varargs = 1;
-}
 
 /* Store the parameter declarations into the current function declaration.
    This is called after parsing the parameter declarations, before
@@ -6857,10 +6841,6 @@ c_expand_body (fndecl, nested_p, can_def
      not safe to try to expand expressions involving them.  */
   immediate_size_expand = 0;
   cfun->x_dont_save_pending_sizes_p = 1;
-
-  /* If this is a varargs function, inform function.c.  */
-  if (c_function_varargs)
-    mark_varargs ();
 
   /* Set up parameters and prepare for return, for the function.  */
   expand_function_start (fndecl, 0);
===================================================================
Index: c-objc-common.c
--- c-objc-common.c	5 Jun 2002 19:35:31 -0000	1.14
+++ c-objc-common.c	28 Jun 2002 06:20:00 -0000
@@ -91,8 +91,7 @@ inline_forbidden_p (nodep, walk_subtrees
 	{
 	  /* We cannot inline functions that take a variable number of
 	     arguments.  */
-	case BUILT_IN_VARARGS_START:
-	case BUILT_IN_STDARG_START:
+	case BUILT_IN_VA_START:
 #if 0
 	  /* Functions that need information about the address of the
              caller can't (shouldn't?) be inlined.  */
===================================================================
Index: c-parse.in
--- c-parse.in	20 Jun 2002 01:30:37 -0000	1.144
+++ c-parse.in	28 Jun 2002 06:20:01 -0000
@@ -526,21 +526,6 @@ unary_expr:
 	/* Refer to the address of a label as a pointer.  */
 	| ANDAND identifier
 		{ $$ = finish_label_address_expr ($2); }
-/* This seems to be impossible on some machines, so let's turn it off.
-   You can use __builtin_next_arg to find the anonymous stack args.
-	| '&' ELLIPSIS
-		{ tree types = TYPE_ARG_TYPES (TREE_TYPE (current_function_decl));
-		  $$ = error_mark_node;
-		  if (TREE_VALUE (tree_last (types)) == void_type_node)
-		    error ("`&...' used in function with fixed number of arguments");
-		  else
-		    {
-		      if (pedantic)
-			pedwarn ("ISO C forbids `&...'");
-		      $$ = tree_last (DECL_ARGUMENTS (current_function_decl));
-		      $$ = build_unary_op (ADDR_EXPR, $$, 0);
-		    } }
-*/
 	| sizeof unary_expr  %prec UNARY
 		{ skip_evaluation--;
 		  if (TREE_CODE ($2) == COMPONENT_REF
@@ -789,11 +774,6 @@ end ifobjc
 old_style_parm_decls:
 	/* empty */
 	| datadecls
-	| datadecls ELLIPSIS
-		/* ... is used here to indicate a varargs function.  */
-		{ c_mark_varargs ();
-		  if (pedantic)
-		    pedwarn ("ISO C does not permit use of `varargs.h'"); }
 	;
 
 /* The following are analogous to lineno_decl, decls and decl
===================================================================
Index: c-tree.h
--- c-tree.h	4 Jun 2002 07:07:01 -0000	1.99
+++ c-tree.h	28 Jun 2002 06:20:01 -0000
@@ -196,7 +196,6 @@ extern void c_print_identifier			PARAMS 
 extern tree build_array_declarator              PARAMS ((tree, tree, int, int));
 extern tree build_enumerator                    PARAMS ((tree, tree));
 extern int  c_decode_option                     PARAMS ((int, char **));
-extern void c_mark_varargs                      PARAMS ((void));
 extern void check_for_loop_decls                PARAMS ((void));
 extern void clear_parm_order                    PARAMS ((void));
 extern int  complete_array_type                 PARAMS ((tree, tree, int));
===================================================================
Index: function.c
--- function.c	22 Jun 2002 14:26:53 -0000	1.375
+++ function.c	28 Jun 2002 06:20:03 -0000
@@ -4290,17 +4290,6 @@ assign_parms (fndecl)
   rtx conversion_insns = 0;
   struct args_size alignment_pad;
 
-  /* Nonzero if the last arg is named `__builtin_va_alist',
-     which is used on some machines for old-fashioned non-ANSI varargs.h;
-     this should be stuck onto the stack as if it had arrived there.  */
-  int hide_last_arg
-    = (current_function_varargs
-       && fnargs
-       && (parm = tree_last (fnargs)) != 0
-       && DECL_NAME (parm)
-       && (! strcmp (IDENTIFIER_POINTER (DECL_NAME (parm)),
-		     "__builtin_va_alist")));
-
   /* Nonzero if function takes extra anonymous args.
      This means the last named arg must be on the stack
      right before the anonymous ones.  */
@@ -4369,7 +4358,7 @@ assign_parms (fndecl)
 
       /* Set LAST_NAMED if this is last named arg before last
 	 anonymous args.  */
-      if (stdarg || current_function_varargs)
+      if (stdarg)
 	{
 	  tree tem;
 
@@ -4397,11 +4386,6 @@ assign_parms (fndecl)
 	  continue;
 	}
 
-      /* For varargs.h function, save info about regs and stack space
-	 used by the individual args, not including the va_alist arg.  */
-      if (hide_last_arg && last_named)
-	current_function_args_info = args_so_far;
-
       /* Find mode of arg as it is passed, and mode of arg
 	 as it should be during execution of this function.  */
       passed_mode = TYPE_MODE (passed_type);
@@ -5125,8 +5109,7 @@ assign_parms (fndecl)
   /* For stdarg.h function, save info about
      regs and stack space used by the named args.  */
 
-  if (!hide_last_arg)
-    current_function_args_info = args_so_far;
+  current_function_args_info = args_so_far;
 
   /* Set the rtx used for the function return value.  Put this in its
      own variable so any optimizers that need this information don't have
@@ -6278,8 +6261,7 @@ prepare_function_start ()
   /* Indicate we have no need of a frame pointer yet.  */
   frame_pointer_needed = 0;
 
-  /* By default assume not varargs or stdarg.  */
-  current_function_varargs = 0;
+  /* By default assume not stdarg.  */
   current_function_stdarg = 0;
 
   /* We haven't made any trampolines for this function yet.  */
@@ -6377,15 +6359,6 @@ init_function_for_compilation ()
   VARRAY_GROW (prologue, 0);
   VARRAY_GROW (epilogue, 0);
   VARRAY_GROW (sibcall_epilogue, 0);
-}
-
-/* Indicate that the current function uses extra args
-   not explicitly mentioned in the argument list in any fashion.  */
-
-void
-mark_varargs ()
-{
-  current_function_varargs = 1;
 }
 
 /* Expand a call to __main at the beginning of a possible main function.  */
===================================================================
Index: function.h
--- function.h	23 Jun 2002 15:57:53 -0000	1.84
+++ function.h	28 Jun 2002 06:20:03 -0000
@@ -451,12 +451,7 @@ struct function GTY(())
      function.  */
   unsigned int limit_stack : 1;
 
-  /* Nonzero if current function uses varargs.h or equivalent.
-     Zero for functions that use stdarg.h.  */
-  unsigned int varargs : 1;
-
-  /* Nonzero if current function uses stdarg.h or equivalent.
-     Zero for functions that use varargs.h.  */
+  /* Nonzero if current function uses stdarg.h or equivalent.  */
   unsigned int stdarg : 1;
 
   /* Nonzero if this function is being processed in function-at-a-time
@@ -525,7 +520,6 @@ extern int virtuals_instantiated;
 #define current_function_pretend_args_size (cfun->pretend_args_size)
 #define current_function_outgoing_args_size (cfun->outgoing_args_size)
 #define current_function_arg_offset_rtx (cfun->arg_offset_rtx)
-#define current_function_varargs (cfun->varargs)
 #define current_function_stdarg (cfun->stdarg)
 #define current_function_internal_arg_pointer (cfun->internal_arg_pointer)
 #define current_function_return_rtx (cfun->return_rtx)
===================================================================
Index: integrate.c
--- integrate.c	23 Jun 2002 15:57:53 -0000	1.198
+++ integrate.c	28 Jun 2002 06:20:04 -0000
@@ -178,8 +178,7 @@ function_cannot_inline_p (fndecl)
     return N_("function cannot be inline");
 
   /* No inlines with varargs.  */
-  if ((last && TREE_VALUE (last) != void_type_node)
-      || current_function_varargs)
+  if (last && TREE_VALUE (last) != void_type_node)
     return N_("varargs function cannot be inline");
 
   if (current_function_calls_alloca)
===================================================================
Index: sibcall.c
--- sibcall.c	11 Jun 2002 12:21:50 -0000	1.38
+++ sibcall.c	28 Jun 2002 06:20:04 -0000
@@ -676,8 +676,7 @@ optimize_sibling_and_tail_recursive_call
 	     sibling call optimizations, but not tail recursion.
 	     Similarly if we use varargs or stdarg since they implicitly
 	     may take the address of an argument.  */
-	  if (current_function_calls_alloca
-	      || current_function_varargs || current_function_stdarg)
+	  if (current_function_calls_alloca || current_function_stdarg)
 	    sibcall = 0;
 
 	  /* See if there are any reasons we can't perform either sibling or
===================================================================
Index: tree.h
--- tree.h	4 Jun 2002 07:08:15 -0000	1.342
+++ tree.h	28 Jun 2002 06:20:05 -0000
@@ -2897,7 +2897,6 @@ extern void build_common_tree_nodes_2	PA
 extern void setjmp_protect_args		PARAMS ((void));
 extern void setjmp_protect		PARAMS ((tree));
 extern void expand_main_function	PARAMS ((void));
-extern void mark_varargs		PARAMS ((void));
 extern void init_dummy_function_start	PARAMS ((void));
 extern void expand_dummy_function_end	PARAMS ((void));
 extern void init_function_for_compilation	PARAMS ((void));
===================================================================
Index: config/alpha/alpha.c
--- config/alpha/alpha.c	12 Jun 2002 02:57:02 -0000	1.263
+++ config/alpha/alpha.c	28 Jun 2002 06:20:07 -0000
@@ -6163,7 +6163,7 @@ alpha_build_va_list ()
 
 void
 alpha_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg ATTRIBUTE_UNUSED;
 {
@@ -6174,7 +6174,7 @@ alpha_va_start (stdarg_p, valist, nextar
     return;
 
   if (TARGET_ABI_UNICOSMK)
-    std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+    std_expand_builtin_va_start (1, valist, nextarg);
 
   /* For Unix, SETUP_INCOMING_VARARGS moves the starting address base
      up by 48, storing fp arg registers in the first 48 bytes, and the
@@ -6185,7 +6185,7 @@ alpha_va_start (stdarg_p, valist, nextar
      in order to account for the integer arg registers which are counted
      in argsize above, but which are not actually stored on the stack.  */
 
-  if (NUM_ARGS <= 5 + stdarg_p)
+  if (NUM_ARGS <= 6)
     offset = TARGET_ABI_OPEN_VMS ? UNITS_PER_WORD : 6 * UNITS_PER_WORD;
   else
     offset = -6 * UNITS_PER_WORD;
@@ -6734,7 +6734,7 @@ alpha_sa_size ()
 
       alpha_procedure_type
 	= (sa_size || get_frame_size() != 0
-	   || current_function_outgoing_args_size || current_function_varargs
+	   || current_function_outgoing_args_size
 	   || current_function_stdarg || current_function_calls_alloca
 	   || frame_pointer_needed)
 	  ? PT_STACK : PT_REGISTER;
===================================================================
Index: config/alpha/unicosmk.h
--- config/alpha/unicosmk.h	12 Jun 2002 03:06:10 -0000	1.14
+++ config/alpha/unicosmk.h	28 Jun 2002 06:20:07 -0000
@@ -237,10 +237,7 @@ do {								\
    On Unicos/Mk, the standard subroutine __T3E_MISMATCH stores all register
    arguments on the stack. Unfortunately, it doesn't always store the first
    one (i.e. the one that arrives in $16 or $f16). This is not a problem
-   with stdargs as we always have at least one named argument there. This is
-   not always the case when varargs.h is used, however. In such cases, we
-   have to store the first argument ourselves. We use the information from
-   the CIW to determine whether the first argument arrives in $16 or $f16.  */
+   with stdargs as we always have at least one named argument there.  */
 
 #undef SETUP_INCOMING_VARARGS
 #define SETUP_INCOMING_VARARGS(CUM,MODE,TYPE,PRETEND_SIZE,NO_RTL)	\
@@ -248,36 +245,9 @@ do {								\
     {									\
       if (! (NO_RTL))							\
         {								\
-	  int start;							\
-									\
-	  start = (CUM).num_reg_words;					\
-	  if (!current_function_varargs || start == 0)			\
-	    ++start;							\
+	  int start = (CUM).num_reg_words + 1;				\
 									\
           emit_insn (gen_umk_mismatch_args (GEN_INT (start)));		\
-	  if (current_function_varargs && (CUM).num_reg_words == 0)	\
-	    {								\
-	      rtx tmp;							\
-	      rtx int_label, end_label;					\
-									\
-	      tmp = gen_reg_rtx (DImode);				\
-	      emit_move_insn (tmp,					\
-			      gen_rtx_ZERO_EXTRACT (DImode,		\
-						    gen_rtx_REG (DImode, 2),\
-						    (GEN_INT (1)),	\
-						    (GEN_INT (7))));	\
-	      int_label = gen_label_rtx ();				\
-	      end_label = gen_label_rtx ();				\
-	      emit_insn (gen_cmpdi (tmp, GEN_INT (0)));			\
-	      emit_jump_insn (gen_beq (int_label));			\
-	      emit_move_insn (gen_rtx_MEM (DFmode, virtual_incoming_args_rtx),\
-			      gen_rtx_REG (DFmode, 48));		\
-	      emit_jump (end_label);					\
-	      emit_label (int_label);					\
-	      emit_move_insn (gen_rtx_MEM (DImode, virtual_incoming_args_rtx),\
-			      gen_rtx_REG (DImode, 16));		\
-	      emit_label (end_label);					\
-	    }								\
 	  emit_insn (gen_arg_home_umk ());				\
         }								\
 									\
===================================================================
Index: config/arc/arc.c
--- config/arc/arc.c	19 May 2002 05:22:59 -0000	1.29
+++ config/arc/arc.c	28 Jun 2002 06:20:08 -0000
@@ -802,12 +802,8 @@ arc_setup_incoming_varargs (cum, mode, t
   if (mode == BLKmode)
     abort ();
 
-  /* We must treat `__builtin_va_alist' as an anonymous arg.  */
-  if (current_function_varargs)
-    first_anon_arg = *cum;
-  else
-    first_anon_arg = *cum + ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1)
-			     / UNITS_PER_WORD);
+  first_anon_arg = *cum + ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1)
+			   / UNITS_PER_WORD);
 
   if (first_anon_arg < MAX_ARC_PARM_REGS && !no_rtl)
     {
@@ -2266,7 +2262,7 @@ arc_ccfsm_record_branch_deleted ()
 
 void
 arc_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg;
 {
@@ -2275,7 +2271,7 @@ arc_va_start (stdarg_p, valist, nextarg)
       && (current_function_args_info & 1))
     nextarg = plus_constant (nextarg, UNITS_PER_WORD);
 
-  std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+  std_expand_builtin_va_start (1, valist, nextarg);
 }
 
 rtx
===================================================================
Index: config/arc/arc.h
--- config/arc/arc.h	10 Jun 2002 22:35:45 -0000	1.51
+++ config/arc/arc.h	28 Jun 2002 06:20:08 -0000
@@ -665,15 +665,9 @@ extern enum reg_class arc_regno_reg_clas
    a reg.  This includes arguments that have to be passed by reference as the
    pointer to them is passed in a reg if one is available (and that is what
    we're given).
-   When passing arguments NAMED is always 1.  When receiving arguments NAMED
-   is 1 for each argument except the last in a stdarg/varargs function.  In
-   a stdarg function we want to treat the last named arg as named.  In a
-   varargs function we want to treat the last named arg (which is
-   `__builtin_va_alist') as unnamed.
    This macro is only used in this file.  */
-#define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \
-((!current_function_varargs || (NAMED))					\
- && (CUM) < MAX_ARC_PARM_REGS						\
+#define PASS_IN_REG_P(CUM, MODE, TYPE) \
+((CUM) < MAX_ARC_PARM_REGS						\
  && ((ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE))				\
       + ROUND_ADVANCE_ARG ((MODE), (TYPE))				\
       <= MAX_ARC_PARM_REGS)))
@@ -693,7 +687,7 @@ extern enum reg_class arc_regno_reg_clas
 /* On the ARC the first MAX_ARC_PARM_REGS args are normally in registers
    and the rest are pushed.  */
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-(PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED))				\
+(PASS_IN_REG_P ((CUM), (MODE), (TYPE))					\
  ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)))	\
  : 0)
 
===================================================================
Index: config/avr/avr.c
--- config/avr/avr.c	9 Jun 2002 18:06:10 -0000	1.76
+++ config/avr/avr.c	28 Jun 2002 06:20:09 -0000
@@ -2762,7 +2762,6 @@ frame_pointer_required_p ()
 {
   return (current_function_calls_alloca
 	  || current_function_args_info.nregs == 0
-	  || current_function_varargs
   	  || get_frame_size () > 0);
 }
 
===================================================================
Index: config/c4x/c4x-protos.h
--- config/c4x/c4x-protos.h	4 Jun 2002 07:08:47 -0000	1.27
+++ config/c4x/c4x-protos.h	28 Jun 2002 06:20:09 -0000
@@ -59,8 +59,6 @@ extern struct rtx_def *c4x_function_arg 
 #if defined(RTX_CODE) && defined(TREE_CODE)
 extern void c4x_init_cumulative_args PARAMS ((CUMULATIVE_ARGS *c, tree, rtx));
 
-extern void c4x_va_start PARAMS ((int, tree, rtx));
-
 extern struct rtx_def *c4x_va_arg PARAMS ((tree, tree));
 
 extern rtx c4x_expand_builtin PARAMS ((tree, rtx, rtx,
===================================================================
Index: config/c4x/c4x.c
--- config/c4x/c4x.c	4 Jun 2002 07:08:48 -0000	1.105
+++ config/c4x/c4x.c	28 Jun 2002 06:20:10 -0000
@@ -702,19 +702,6 @@ c4x_function_arg (cum, mode, type, named
     return NULL_RTX;
 }
 
-
-void
-c4x_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
-     tree valist;
-     rtx nextarg;
-{
-  nextarg = plus_constant (nextarg, stdarg_p ? 0 : UNITS_PER_WORD * 2);
-
-  std_expand_builtin_va_start (stdarg_p, valist, nextarg);
-}
-
-
 /* C[34]x arguments grow in weird ways (downwards) that the standard
    varargs stuff can't handle..  */
 rtx
===================================================================
Index: config/c4x/c4x.h
--- config/c4x/c4x.h	15 Jun 2002 09:41:13 -0000	1.108
+++ config/c4x/c4x.h	28 Jun 2002 06:20:10 -0000
@@ -1165,9 +1165,6 @@ CUMULATIVE_ARGS;
 
 /* Varargs handling.  */
 
-#define	EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
-  c4x_va_start (stdarg, valist, nextarg)
-
 #define EXPAND_BUILTIN_VA_ARG(valist, type) \
   c4x_va_arg (valist, type)
 
===================================================================
Index: config/cris/cris.h
--- config/cris/cris.h	19 May 2002 05:23:05 -0000	1.34
+++ config/cris/cris.h	28 Jun 2002 06:20:11 -0000
@@ -1044,8 +1044,7 @@ struct cum_args {int regs;};
       if (TARGET_PDEBUG)						\
 	{								\
 	  fprintf (asm_out_file,					\
-		   "\n; VA:: %s: %d args before, anon @ #%d, %dtime\n",	\
-		   current_function_varargs ? "OLD" : "ANSI",		\
+		   "\n; VA:: ANSI: %d args before, anon @ #%d, %dtime\n", \
 		   (ARGSSF).regs, PRETEND, SECOND);			\
 	}								\
     }									\
===================================================================
Index: config/fr30/fr30.c
--- config/fr30/fr30.c	11 Jun 2002 12:22:29 -0000	1.23
+++ config/fr30/fr30.c	28 Jun 2002 06:20:11 -0000
@@ -419,11 +419,9 @@ fr30_setup_incoming_varargs (arg_regs_us
     abort ();
 
 #if STRICT_ARGUMENT_NAMING
-  /* We must treat `__builtin_va_alist' as an anonymous arg.
-     But otherwise if STRICT_ARGUMENT_NAMING is true then the
-     last named arg must not be treated as an anonymous arg. */
-  if (! current_function_varargs)
-    arg_regs_used_so_far += fr30_num_arg_regs (int_mode, type);
+  /* If STRICT_ARGUMENT_NAMING is true then the last named
+     arg must not be treated as an anonymous arg. */
+  arg_regs_used_so_far += fr30_num_arg_regs (int_mode, type);
 #endif
   
   size = FR30_NUM_ARG_REGS - arg_regs_used_so_far;
===================================================================
Index: config/i386/i386.c
--- config/i386/i386.c	16 Jun 2002 20:18:24 -0000	1.425
+++ config/i386/i386.c	28 Jun 2002 06:20:14 -0000
@@ -2447,7 +2447,7 @@ ix86_setup_incoming_varargs (cum, mode, 
 
 void
 ix86_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg;
 {
@@ -2458,7 +2458,7 @@ ix86_va_start (stdarg_p, valist, nextarg
   /* Only 64bit target needs something special.  */
   if (!TARGET_64BIT)
     {
-      std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+      std_expand_builtin_va_start (1, valist, nextarg);
       return;
     }
 
===================================================================
Index: config/i960/i960.c
--- config/i960/i960.c	25 May 2002 22:01:52 -0000	1.37
+++ config/i960/i960.c	28 Jun 2002 06:20:14 -0000
@@ -85,9 +85,9 @@ static int ret_label = 0;
    This is used to help identify functions that use an argument block.  */
 
 #define VARARGS_STDARG_FUNCTION(FNDECL)	\
-((TYPE_ARG_TYPES (TREE_TYPE (FNDECL)) != 0						      \
-  && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (FNDECL)))) != void_type_node))    \
- || current_function_varargs)
+(TYPE_ARG_TYPES (TREE_TYPE (FNDECL)) != 0				\
+  && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (TREE_TYPE (FNDECL)))))	\
+      != void_type_node)
 
 /* Initialize the GCC target structure.  */
 #undef TARGET_ASM_ALIGNED_SI_OP
@@ -518,7 +518,7 @@ emit_move_sequence (operands, mode)
   
   if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) != REG
       && (operands[1] != const0_rtx || current_function_args_size
-	  || current_function_varargs || current_function_stdarg
+	  || current_function_stdarg
 	  || rtx_equal_function_value_matters))
     /* Here we use the same test as movsi+1 pattern -- see i960.md.  */
     operands[1] = force_reg (mode, operands[1]);
===================================================================
Index: config/i960/i960.md
--- config/i960/i960.md	27 Mar 2002 22:23:12 -0000	1.24
+++ config/i960/i960.md	28 Jun 2002 06:20:15 -0000
@@ -594,7 +594,7 @@
 ;; the calling convention is defined so that the arg pointer when it is not
 ;; overwise being used is zero.  Thus, we can handle store zero to memory
 ;; by storing an unused arg pointer.  The arg pointer will be unused if
-;; current_function_args_size is zero and this is not a stdarg/varargs
+;; current_function_args_size is zero and this is not a stdarg
 ;; function.  This value of the former variable is not valid until after
 ;; all rtl generation is complete, including function inlining (because a
 ;; function that doesn't need an arg pointer may be inlined into a function
@@ -605,7 +605,6 @@
   [(set (match_operand:SI 0 "general_operand" "=d,d,d,m")
 	(match_operand:SI 1 "general_operand" "dI,i,m,dJ"))]
   "(current_function_args_size == 0
-    && current_function_varargs == 0
     && current_function_stdarg == 0
     && rtx_equal_function_value_matters == 0)
    && (register_operand (operands[0], SImode)
@@ -643,7 +642,6 @@
   [(set (match_operand:SI 0 "general_operand" "=d,d,d,m")
 	(match_operand:SI 1 "general_operand" "dI,i,m,d"))]
   "(current_function_args_size != 0
-    || current_function_varargs != 0
     || current_function_stdarg != 0
     || rtx_equal_function_value_matters != 0)
    && (register_operand (operands[0], SImode)
@@ -692,7 +690,6 @@
   [(set (match_operand:HI 0 "general_operand" "=d,d,d,m")
 	(match_operand:HI 1 "general_operand" "dI,i,m,dJ"))]
   "(current_function_args_size == 0
-    && current_function_varargs == 0
     && current_function_stdarg == 0
     && rtx_equal_function_value_matters == 0)
    && (register_operand (operands[0], HImode)
@@ -731,7 +728,6 @@
   [(set (match_operand:HI 0 "general_operand" "=d,d,d,m")
 	(match_operand:HI 1 "general_operand" "dI,i,m,d"))]
   "(current_function_args_size != 0
-    || current_function_varargs != 0
     || current_function_stdarg != 0
     || rtx_equal_function_value_matters != 0)
    && (register_operand (operands[0], HImode)
@@ -777,7 +773,6 @@
   [(set (match_operand:QI 0 "general_operand" "=d,d,d,m")
 	(match_operand:QI 1 "general_operand" "dI,i,m,dJ"))]
   "(current_function_args_size == 0
-    && current_function_varargs == 0
     && current_function_stdarg == 0
     && rtx_equal_function_value_matters == 0)
    && (register_operand (operands[0], QImode)
@@ -816,7 +811,6 @@
   [(set (match_operand:QI 0 "general_operand" "=d,d,d,m")
 	(match_operand:QI 1 "general_operand" "dI,i,m,d"))]
   "(current_function_args_size != 0
-    || current_function_varargs != 0
     || current_function_stdarg != 0
     || rtx_equal_function_value_matters != 0)
    && (register_operand (operands[0], QImode)
@@ -862,7 +856,6 @@
   [(set (match_operand:DI 0 "general_operand" "=d,d,d,d,m,o")
 	(match_operand:DI 1 "general_operand" "d,I,i,m,d,J"))]
   "(current_function_args_size == 0
-    && current_function_varargs == 0
     && current_function_stdarg == 0
     && rtx_equal_function_value_matters == 0)
    && (register_operand (operands[0], DImode)
@@ -892,7 +885,6 @@
   [(set (match_operand:DI 0 "general_operand" "=d,d,d,d,m")
 	(match_operand:DI 1 "general_operand" "d,I,i,m,d"))]
   "(current_function_args_size != 0
-    || current_function_varargs != 0
     || current_function_stdarg != 0
     || rtx_equal_function_value_matters != 0)
    && (register_operand (operands[0], DImode)
@@ -945,7 +937,6 @@
   [(set (match_operand:TI 0 "general_operand" "=d,d,d,d,m,o")
 	(match_operand:TI 1 "general_operand" "d,I,i,m,d,J"))]
   "(current_function_args_size == 0
-    && current_function_varargs == 0
     && current_function_stdarg == 0
     && rtx_equal_function_value_matters == 0)
    && (register_operand (operands[0], TImode)
@@ -975,7 +966,6 @@
   [(set (match_operand:TI 0 "general_operand" "=d,d,d,d,m")
 	(match_operand:TI 1 "general_operand" "d,I,i,m,d"))]
   "(current_function_args_size != 0
-    || current_function_varargs != 0
     || current_function_stdarg != 0
     || rtx_equal_function_value_matters != 0)
    && (register_operand (operands[0], TImode)
@@ -1079,7 +1069,6 @@
   [(set (match_operand:DF 0 "general_operand" "=r,*f,d,d,m,o")
 	(match_operand:DF 1 "fpmove_src_operand" "r,GH,F,m,d,G"))]
   "(current_function_args_size == 0
-    && current_function_varargs == 0
     && current_function_stdarg == 0
     && rtx_equal_function_value_matters == 0)
    && (register_operand (operands[0], DFmode)
@@ -1115,7 +1104,6 @@
   [(set (match_operand:DF 0 "general_operand" "=r,*f,d,d,m")
 	(match_operand:DF 1 "fpmove_src_operand" "r,GH,F,m,d"))]
   "(current_function_args_size != 0
-    || current_function_varargs != 0
     || current_function_stdarg != 0
     || rtx_equal_function_value_matters != 0)
    && (register_operand (operands[0], DFmode)
@@ -1157,7 +1145,6 @@
   [(set (match_operand:SF 0 "general_operand" "=r,*f,d,d,m")
 	(match_operand:SF 1 "fpmove_src_operand" "r,GH,F,m,dG"))]
   "(current_function_args_size == 0
-    && current_function_varargs == 0
     && current_function_stdarg == 0
     && rtx_equal_function_value_matters == 0)
    && (register_operand (operands[0], SFmode)
@@ -1192,7 +1179,6 @@
   [(set (match_operand:SF 0 "general_operand" "=r,*f,d,d,m")
 	(match_operand:SF 1 "fpmove_src_operand" "r,GH,F,m,d"))]
   "(current_function_args_size != 0
-    || current_function_varargs != 0
     || current_function_stdarg != 0
     || rtx_equal_function_value_matters != 0)
    && (register_operand (operands[0], SFmode)
===================================================================
Index: config/ia64/ia64-protos.h
--- config/ia64/ia64-protos.h	4 Jun 2002 07:09:04 -0000	1.43
+++ config/ia64/ia64-protos.h	28 Jun 2002 06:20:15 -0000
@@ -104,7 +104,6 @@ extern rtx ia64_function_arg PARAMS((CUM
 				     tree, int, int));
 extern rtx ia64_expand_builtin PARAMS((tree, rtx, rtx,
 				       enum machine_mode, int));
-extern void ia64_va_start PARAMS((int, tree, rtx));
 extern rtx ia64_va_arg PARAMS((tree, tree));
 extern rtx ia64_function_value PARAMS((tree, tree));
 #endif /* RTX_CODE */
===================================================================
Index: config/ia64/ia64.c
--- config/ia64/ia64.c	11 Jun 2002 12:22:35 -0000	1.176
+++ config/ia64/ia64.c	28 Jun 2002 06:20:16 -0000
@@ -3050,9 +3050,8 @@ ia64_setup_incoming_varargs (cum, int_mo
      int *           pretend_size;
      int	     second_time ATTRIBUTE_UNUSED;
 {
-  /* If this is a stdarg function, then skip the current argument.  */
-  if (! current_function_varargs)
-    ia64_function_arg_advance (&cum, int_mode, type, 1);
+  /* Skip the current argument.  */
+  ia64_function_arg_advance (&cum, int_mode, type, 1);
 
   if (cum.words < MAX_ARGUMENT_SLOTS)
     {
@@ -3453,27 +3452,6 @@ ia64_function_arg_pass_by_reference (cum
   return type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST;
 }
 
-/* Implement va_start.  */
-
-void
-ia64_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
-     tree valist;
-     rtx nextarg;
-{
-  int arg_words;
-  int ofs;
-
-  arg_words = current_function_args_info.words;
-
-  if (stdarg_p)
-    ofs = 0;
-  else
-    ofs = (arg_words >= MAX_ARGUMENT_SLOTS ? -UNITS_PER_WORD : 0);
-
-  nextarg = plus_constant (nextarg, ofs);
-  std_expand_builtin_va_start (1, valist, nextarg);
-}
 
 /* Implement va_arg.  */
 
===================================================================
Index: config/ia64/ia64.h
--- config/ia64/ia64.h	14 Jun 2002 00:50:31 -0000	1.121
+++ config/ia64/ia64.h	28 Jun 2002 06:20:17 -0000
@@ -1339,10 +1339,6 @@ do {									\
 (((REGNO) >= GR_ARG_FIRST && (REGNO) < (GR_ARG_FIRST + MAX_ARGUMENT_SLOTS)) \
  || ((REGNO) >= FR_ARG_FIRST && (REGNO) < (FR_ARG_FIRST + MAX_ARGUMENT_SLOTS)))
 
-/* Implement `va_start' for varargs and stdarg.  */
-#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
-  ia64_va_start (stdarg, valist, nextarg)
-
 /* Implement `va_arg'.  */
 #define EXPAND_BUILTIN_VA_ARG(valist, type) \
   ia64_va_arg (valist, type)
===================================================================
Index: config/m32r/m32r.c
--- config/m32r/m32r.c	11 Jun 2002 12:22:39 -0000	1.51
+++ config/m32r/m32r.c	28 Jun 2002 06:20:18 -0000
@@ -1446,12 +1446,8 @@ m32r_setup_incoming_varargs (cum, mode, 
   if (mode == BLKmode)
     abort ();
 
-  /* We must treat `__builtin_va_alist' as an anonymous arg.  */
-  if (current_function_varargs)
-    first_anon_arg = *cum;
-  else
-    first_anon_arg = (ROUND_ADVANCE_CUM (*cum, mode, type)
-		      + ROUND_ADVANCE_ARG (mode, type));
+  first_anon_arg = (ROUND_ADVANCE_CUM (*cum, mode, type)
+		    + ROUND_ADVANCE_ARG (mode, type));
 
   if (first_anon_arg < M32R_MAX_PARM_REGS)
     {
===================================================================
Index: config/m32r/m32r.h
--- config/m32r/m32r.h	10 Jun 2002 22:20:47 -0000	1.66
+++ config/m32r/m32r.h	28 Jun 2002 06:20:18 -0000
@@ -1084,7 +1084,7 @@ M32R_STACK_ALIGN (current_function_outgo
    pointer to them is passed in a reg if one is available (and that is what
    we're given).
    This macro is only used in this file.  */
-#define PASS_IN_REG_P(CUM, MODE, TYPE, NAMED) \
+#define PASS_IN_REG_P(CUM, MODE, TYPE) \
   (ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)) < M32R_MAX_PARM_REGS)
 
 /* Determine where to put an argument to a function.
@@ -1102,14 +1102,7 @@ M32R_STACK_ALIGN (current_function_outgo
 /* On the M32R the first M32R_MAX_PARM_REGS args are normally in registers
    and the rest are pushed.  */
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-  (PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED))			\
-   ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)))	\
-   : 0)
-
-/* ??? Quick hack to try to get varargs working the normal way.  */
-#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
-  (((! current_function_varargs || (NAMED))				\
-    && PASS_IN_REG_P ((CUM), (MODE), (TYPE), (NAMED)))			\
+  (PASS_IN_REG_P ((CUM), (MODE), (TYPE))			\
    ? gen_rtx_REG ((MODE), ROUND_ADVANCE_CUM ((CUM), (MODE), (TYPE)))	\
    : 0)
 
===================================================================
Index: config/m68hc11/m68hc11-protos.h
--- config/m68hc11/m68hc11-protos.h	4 Jun 2002 07:09:08 -0000	1.16
+++ config/m68hc11/m68hc11-protos.h	28 Jun 2002 06:20:18 -0000
@@ -151,10 +151,7 @@ extern int m68hc11_function_arg_pass_by_
                                                           int));
 extern int m68hc11_function_arg_padding PARAMS((enum machine_mode, tree));
 
-extern void m68hc11_expand_builtin_va_start PARAMS((int, tree, rtx));
-
 extern rtx m68hc11_va_arg PARAMS((tree,tree));
-extern void m68hc11_expand_builtin_va_start PARAMS((int,tree,rtx));
 
 extern void m68hc11_function_epilogue PARAMS((FILE*,int));
 
===================================================================
Index: config/m68hc11/m68hc11.c
--- config/m68hc11/m68hc11.c	4 Jun 2002 07:09:09 -0000	1.43
+++ config/m68hc11/m68hc11.c	28 Jun 2002 06:20:19 -0000
@@ -1434,29 +1434,6 @@ m68hc11_function_arg (cum, mode, type, n
   return NULL_RTX;
 }
 
-/* The "standard" implementation of va_start: just assign `nextarg' to
-   the variable.  */
-void
-m68hc11_expand_builtin_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p ATTRIBUTE_UNUSED;
-     tree valist;
-     rtx nextarg;
-{
-  tree t;
-
-  /* SCz: the default implementation in builtins.c adjust the
-     nextarg using UNITS_PER_WORD.  This works only with -mshort
-     and fails when integers are 32-bit.  Here is the correct way.  */
-  if (!stdarg_p)
-    nextarg = plus_constant (nextarg, -INT_TYPE_SIZE / 8);
-
-  t = build (MODIFY_EXPR, TREE_TYPE (valist), valist,
-	     make_tree (ptr_type_node, nextarg));
-  TREE_SIDE_EFFECTS (t) = 1;
-
-  expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
-}
-
 rtx
 m68hc11_va_arg (valist, type)
      tree valist;
===================================================================
Index: config/m68hc11/m68hc11.h
--- config/m68hc11/m68hc11.h	12 Jun 2002 03:06:18 -0000	1.44
+++ config/m68hc11/m68hc11.h	28 Jun 2002 06:20:20 -0000
@@ -1070,9 +1070,6 @@ typedef struct m68hc11_args
 #define CALLER_SAVE_PROFITABLE(REFS,CALLS) 0
 
 /* Implement `va_arg'.  */
-#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
-  m68hc11_expand_builtin_va_start (stdarg, valist, nextarg)
-
 #define EXPAND_BUILTIN_VA_ARG(valist, type) \
   m68hc11_va_arg (valist, type)
 
===================================================================
Index: config/m88k/m88k.c
--- config/m88k/m88k.c	19 May 2002 08:31:52 -0000	1.63
+++ config/m88k/m88k.c	28 Jun 2002 06:20:20 -0000
@@ -1947,7 +1947,6 @@ uses_arg_area_p ()
   register tree parm;
 
   if (current_function_decl == 0
-      || current_function_varargs
       || variable_args_p)
     return 1;
 
===================================================================
Index: config/m88k/m88k.h
--- config/m88k/m88k.h	10 Jun 2002 22:35:48 -0000	1.61
+++ config/m88k/m88k.h	28 Jun 2002 06:20:21 -0000
@@ -1052,8 +1052,7 @@ enum reg_class { NO_REGS, AP_REG, XRF_RE
    may be accessed via the stack pointer) in functions that seem suitable.
    This is computed in `reload', in reload1.c.  */
 #define FRAME_POINTER_REQUIRED \
-(current_function_varargs 					\
- || (TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) 	\
+((TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) 	\
  || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION))
 
 /* Definitions for register eliminations.
===================================================================
Index: config/mips/mips.c
--- config/mips/mips.c	27 Jun 2002 02:10:36 -0000	1.213
+++ config/mips/mips.c	28 Jun 2002 06:20:23 -0000
@@ -4483,15 +4483,10 @@ mips_setup_incoming_varargs (cum, mode, 
 
   /* The caller has advanced CUM up to, but not beyond, the last named
      argument.  Advance a local copy of CUM past the last "real" named
-     argument, to find out how many registers are left over.
+     argument, to find out how many registers are left over.  */
 
-     For K&R varargs, the last named argument is a dummy word-sized one,
-     so CUM already contains the information we need.  For stdarg, it is
-     a real argument (such as the format in printf()) and we need to
-     step over it.  */
   local_cum = *cum;
-  if (!current_function_varargs)
-    FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
+  FUNCTION_ARG_ADVANCE (local_cum, mode, type, 1);
 
   /* Found out how many registers we need to save.  */
   gp_saved = MAX_ARGS_IN_REGISTERS - local_cum.num_gprs;
@@ -4609,14 +4604,11 @@ mips_build_va_list ()
     return ptr_type_node;
 }
 
-/* Implement va_start.   stdarg_p is 0 if implementing
-   __builtin_varargs_va_start, 1 if implementing __builtin_stdarg_va_start.
-   Note that this routine isn't called when compiling e.g. "_vfprintf_r".
-     (It doesn't have "...", so it inherits the pointers of its caller.) */
+/* Implement va_start.   stdarg_p is always 1.  */
 
 void
 mips_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg;
 {
@@ -4694,39 +4686,12 @@ mips_va_start (stdarg_p, valist, nextarg
 	{
 	  /* Everything is in the GPR save area, or in the overflow
 	     area which is contiguous with it.  */
-
-	  int offset = -gpr_save_area_size;
-	  if (gpr_save_area_size == 0)
-	    offset = (stdarg_p ? 0 : -UNITS_PER_WORD);
-	  nextarg = plus_constant (nextarg, offset);
+	  nextarg = plus_constant (nextarg, -gpr_save_area_size);
 	  std_expand_builtin_va_start (1, valist, nextarg);
 	}
     }
   else
-    {
-      /* not EABI */
-      int ofs;
-
-      if (stdarg_p)
-	ofs = 0;
-      else
-	{
-	  /* ??? This had been conditional on
-	       _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
-	     and both iris5.h and iris6.h define _MIPS_SIM.  */
-	  if (mips_abi == ABI_N32
-	      || mips_abi == ABI_64
-	      || mips_abi == ABI_MEABI)
- 	    ofs = (cum->num_gprs < MAX_ARGS_IN_REGISTERS
-		   ? 0
-		   : -UNITS_PER_WORD);
-	  else
-	    ofs = -UNITS_PER_WORD;
-	}
-
-      nextarg = plus_constant (nextarg, ofs);
-      std_expand_builtin_va_start (1, valist, nextarg);
-    }
+    std_expand_builtin_va_start (1, valist, nextarg);
 }
 
 /* Implement va_arg.  */
@@ -7238,7 +7203,7 @@ mips_output_function_prologue (file, siz
 
       /* If this is a varargs function, we need to save all the
          registers onto the stack anyhow.  */
-      if (current_function_stdarg || current_function_varargs)
+      if (current_function_stdarg)
 	savearg = GP_REG_FIRST + 7;
 
       fprintf (file, "\tentry\t");
===================================================================
Index: config/mmix/mmix.c
--- config/mmix/mmix.c	21 Jun 2002 03:55:47 -0000	1.33
+++ config/mmix/mmix.c	28 Jun 2002 06:20:24 -0000
@@ -508,14 +508,6 @@ mmix_function_arg (argsp, mode, type, na
      int named ATTRIBUTE_UNUSED;
      int incoming;
 {
-  /* Handling of the positional dummy parameter for varargs gets nasty.
-     Check execute/991216-3 and function.c:assign_params.  We have to say
-     that the dummy parameter goes on stack in order to get the correct
-     offset when va_start and va_arg is applied.  FIXME: Should do TRT by
-     itself in the gcc core.  */
-  if ((! named && incoming && current_function_varargs) || argsp->now_varargs)
-    return NULL_RTX;
-
   /* Last-argument marker.  */
   if (type == void_type_node)
     return (argsp->regs < MMIX_MAX_ARGS_IN_REGS)
@@ -1256,31 +1248,10 @@ mmix_setup_incoming_varargs (args_so_far
      int * pretend_sizep;
      int second_time ATTRIBUTE_UNUSED;
 {
-  /* For stdarg, the last named variable has been handled, but
-     args_so_farp has not been advanced for it.  For varargs, the current
-     argument is to be counted to the anonymous ones.  */
-  if (current_function_stdarg)
-    {
-      if (args_so_farp->regs + 1 < MMIX_MAX_ARGS_IN_REGS)
-	*pretend_sizep
-	  = (MMIX_MAX_ARGS_IN_REGS - (args_so_farp->regs + 1)) * 8;
-    }
-  else if (current_function_varargs)
-    {
-      if (args_so_farp->regs < MMIX_MAX_ARGS_IN_REGS)
-	*pretend_sizep
-	  = (MMIX_MAX_ARGS_IN_REGS - args_so_farp->regs) * 8;
-
-      /* For varargs, we get here when we see the last named parameter,
-	 which will actually be passed on stack.  So make the next call
-	 (there will be one) to FUNCTION_ARG return 0, to count it on
-	 stack, so va_arg for it will get right.  FIXME: The GCC core
-	 should provide TRT.  */
-      args_so_farp->now_varargs = 1;
-    }
-  else
-    internal_error ("neither varargs or stdarg in mmix_setup_incoming_varargs");
-
+  /* The last named variable has been handled, but
+     args_so_farp has not been advanced for it.  */
+  if (args_so_farp->regs + 1 < MMIX_MAX_ARGS_IN_REGS)
+    *pretend_sizep = (MMIX_MAX_ARGS_IN_REGS - (args_so_farp->regs + 1)) * 8;
 
   /* We assume that one argument takes up one register here.  That should
      be true until we start messing with multi-reg parameters.   */
===================================================================
Index: config/mmix/mmix.h
--- config/mmix/mmix.h	21 Jun 2002 03:55:47 -0000	1.34
+++ config/mmix/mmix.h	28 Jun 2002 06:20:24 -0000
@@ -725,10 +725,10 @@ enum reg_class
    replace with a big comment.  */
 #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) 1
 
-typedef struct { int regs; int lib; int now_varargs; } CUMULATIVE_ARGS;
+typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
 
 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT)	\
- ((CUM).regs = 0, (CUM).lib = ((LIBNAME) != 0), (CUM).now_varargs = 0)
+ ((CUM).regs = 0, (CUM).lib = ((LIBNAME) != 0))
 
 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)		\
  ((CUM).regs							\
===================================================================
Index: config/mn10300/mn10300.c
--- config/mn10300/mn10300.c	17 Dec 2001 15:05:35 -0000	1.42
+++ config/mn10300/mn10300.c	28 Jun 2002 06:20:25 -0000
@@ -525,18 +525,6 @@ expand_prologue ()
   size = get_frame_size () + current_function_outgoing_args_size;
   size += (current_function_outgoing_args_size ? 4 : 0);
 
-  /* If this is an old-style varargs function, then its arguments
-     need to be flushed back to the stack.  */
-  if (current_function_varargs)
-    {
-      emit_move_insn (gen_rtx_MEM (SImode,
-				   plus_constant (stack_pointer_rtx, 4)),
-		      gen_rtx_REG (SImode, 0));
-      emit_move_insn (gen_rtx_MEM (SImode,
-				   plus_constant (stack_pointer_rtx, 8)),
-		      gen_rtx_REG (SImode, 1));
-    }
-
   /* If we use any of the callee-saved registers, save them now. */
   mn10300_gen_multiple_store (mn10300_get_live_callee_saved_regs ());
 
@@ -887,13 +875,11 @@ mn10300_builtin_saveregs ()
 
 void
 mn10300_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg;
 {
-  if (stdarg_p)
-    nextarg = expand_builtin_saveregs ();
-
+  nextarg = expand_builtin_saveregs ();
   std_expand_builtin_va_start (stdarg_p, valist, nextarg);
 }
 
===================================================================
Index: config/pa/som.h
--- config/pa/som.h	19 May 2002 07:55:41 -0000	1.36
+++ config/pa/som.h	28 Jun 2002 06:20:25 -0000
@@ -198,10 +198,9 @@ do {								\
 		   }							\
 	       }							\
 	     /* anonymous args */					\
-	     if ((TYPE_ARG_TYPES (tree_type) != 0			\
-		  && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\
-		      != void_type_node))				\
-		 || current_function_varargs)				\
+	     if (TYPE_ARG_TYPES (tree_type) != 0			\
+		 && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\
+		     != void_type_node))				\
 	       {							\
 		 for (; i < 4; i++)					\
 		   fprintf (FILE, ",ARGW%d=GR", i);			\
===================================================================
Index: config/rs6000/rs6000.c
--- config/rs6000/rs6000.c	28 Jun 2002 04:21:17 -0000	1.333
+++ config/rs6000/rs6000.c	28 Jun 2002 06:20:27 -0000
@@ -3094,7 +3094,7 @@ rs6000_build_va_list ()
 
 void
 rs6000_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg;
 {
@@ -3105,7 +3105,7 @@ rs6000_va_start (stdarg_p, valist, nexta
   /* Only SVR4 needs something special.  */
   if (DEFAULT_ABI != ABI_V4)
     {
-      std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+      std_expand_builtin_va_start (1, valist, nextarg);
       return;
     }
 
===================================================================
Index: config/s390/s390.c
--- config/s390/s390.c	11 Jun 2002 20:15:31 -0000	1.41
+++ config/s390/s390.c	28 Jun 2002 06:20:28 -0000
@@ -3201,8 +3201,7 @@ s390_frame_info (frame)
   if (! current_function_is_leaf
       || frame->frame_size > 0
       || current_function_calls_alloca 
-      || current_function_stdarg
-      || current_function_varargs)
+      || current_function_stdarg)
     frame->frame_size += STARTING_FRAME_OFFSET;
 
   /* If we need to allocate a frame, the stack pointer is changed.  */ 
@@ -3260,7 +3259,7 @@ s390_frame_info (frame)
       frame->return_reg_saved_p = (j >= RETURN_REGNUM && i <= RETURN_REGNUM);
     }
 
-  if (current_function_stdarg || current_function_varargs)
+  if (current_function_stdarg)
     {
       /* Varargs function need to save from gpr 2 to gpr 15.  */
       frame->first_save_gpr = 2;
@@ -3435,7 +3434,7 @@ s390_emit_prologue ()
   
   /* Save fprs for variable args.  */
 
-  if (current_function_stdarg || current_function_varargs)
+  if (current_function_stdarg)
     {
       /* Save fpr 0 and 2.  */ 
 
@@ -3950,9 +3949,8 @@ s390_build_va_list ()
 }
 
 /* Implement va_start by filling the va_list structure VALIST.
-   STDARG_P is true if implementing __builtin_stdarg_va_start,
-   false if implementing __builtin_varargs_va_start.  NEXTARG
-   points to the first anonymous stack argument.
+   STDARG_P is always true, and ignored.
+   NEXTARG points to the first anonymous stack argument.
 
    The following global variables are used to initialize
    the va_list structure:
@@ -3965,7 +3963,7 @@ s390_build_va_list ()
 
 void
 s390_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg ATTRIBUTE_UNUSED;
 {
@@ -4003,8 +4001,6 @@ s390_va_start (stdarg_p, valist, nextarg
 
   off = INTVAL (current_function_arg_offset_rtx);
   off = off < 0 ? 0 : off;
-  if (! stdarg_p)
-    off = off > 0 ? off - UNITS_PER_WORD : off;
   if (TARGET_DEBUG_ARG)
     fprintf (stderr, "va_start: n_gpr = %d, n_fpr = %d off %d\n",
 	     (int)n_gpr, (int)n_fpr, off);
===================================================================
Index: config/sh/sh.c
--- config/sh/sh.c	18 Jun 2002 19:03:15 -0000	1.153
+++ config/sh/sh.c	28 Jun 2002 06:20:29 -0000
@@ -4532,7 +4532,7 @@ sh_expand_prologue ()
     }
 
   /* Emit the code for SETUP_VARARGS.  */
-  if (current_function_varargs || current_function_stdarg)
+  if (current_function_stdarg)
     {
       /* This is not used by the SH3E calling convention  */
       if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
@@ -5226,7 +5226,7 @@ sh_build_va_list ()
 
 void
 sh_va_start (stdarg_p, valist, nextarg)
-     int stdarg_p;
+     int stdarg_p ATTRIBUTE_UNUSED;
      tree valist;
      rtx nextarg;
 {
@@ -5238,20 +5238,13 @@ sh_va_start (stdarg_p, valist, nextarg)
   if (TARGET_SH5)
     {
       expand_builtin_saveregs ();
-      /* When the varargs dummy argument is ``passed'' on a register,
-	 we don't want std_expand_builtin_va_start() to apply any
-	 correction for it, so set stdarg_p so as to pretend there's
-	 no such dummy argument.  */
-      if (current_function_args_info.arg_count[(int) SH_ARG_INT]
-	  < NPARM_REGS (SImode))
-	stdarg_p = 1;
-      std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+      std_expand_builtin_va_start (1, valist, nextarg);
       return;
     }
 
   if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
     {
-      std_expand_builtin_va_start (stdarg_p, valist, nextarg);
+      std_expand_builtin_va_start (1, valist, nextarg);
       return;
     }
 
@@ -5303,11 +5296,6 @@ sh_va_start (stdarg_p, valist, nextarg)
   expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
 
   u = make_tree (ptr_type_node, nextarg);
-  if (! stdarg_p && (nint == 0 || nfp == 0))
-    {
-      u = fold (build (PLUS_EXPR, ptr_type_node, u,
-		       build_int_2 (-UNITS_PER_WORD, -1)));
-    }
   t = build (MODIFY_EXPR, ptr_type_node, next_stack, u);
   TREE_SIDE_EFFECTS (t) = 1;
   expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
===================================================================
Index: config/sh/sh.h
--- config/sh/sh.h	24 Jun 2002 18:11:55 -0000	1.153
+++ config/sh/sh.h	28 Jun 2002 06:20:30 -0000
@@ -1843,8 +1843,7 @@ struct sh_args {
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
   ((! TARGET_SH5 \
     && PASS_IN_REG_P ((CUM), (MODE), (TYPE))				\
-    && ((NAMED)								\
-	|| (! TARGET_HITACHI && (TARGET_SH3E || ! current_function_varargs)))) \
+    && ((NAMED) || !TARGET_HITACHI))					\
    ? gen_rtx_REG ((MODE),						\
 		  ((BASE_ARG_REG (MODE) + ROUND_REG ((CUM), (MODE))) 	\
 		   ^ ((MODE) == SFmode && TARGET_SH4			\
@@ -2007,7 +2006,7 @@ struct sh_args {
    later.  Fortunately, we already have two flags that are part of struct
    function that tell if a function uses varargs or stdarg.  */
 #define SETUP_INCOMING_VARARGS(ASF, MODE, TYPE, PAS, ST)  do \
-  if (! current_function_varargs && ! current_function_stdarg) \
+  if (! current_function_stdarg) \
     abort (); \
 while (0)
 
===================================================================
Index: config/sparc/sparc.h
--- config/sparc/sparc.h	24 Jun 2002 10:08:38 -0000	1.203
+++ config/sparc/sparc.h	28 Jun 2002 06:20:31 -0000
@@ -1097,7 +1097,6 @@ extern int sparc_mode_class[];
 #define FRAME_POINTER_REQUIRED				\
   (TARGET_FLAT						\
    ? (current_function_calls_alloca			\
-      || current_function_varargs			\
       || !leaf_function_p ())				\
    : ! (leaf_function_p () && only_leaf_regs_used ()))
 
===================================================================
Index: config/stormy16/stormy16.c
--- config/stormy16/stormy16.c	11 Jun 2002 12:22:48 -0000	1.23
+++ config/stormy16/stormy16.c	28 Jun 2002 06:20:32 -0000
@@ -874,7 +874,7 @@ xstormy16_compute_stack_layout ()
     if (REG_NEEDS_SAVE (regno, ifun))
       layout.register_save_size += UNITS_PER_WORD;
   
-  if (current_function_varargs || current_function_stdarg)
+  if (current_function_stdarg)
     layout.stdarg_save_size = NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD;
   else
     layout.stdarg_save_size = 0;
===================================================================
Index: doc/invoke.texi
--- doc/invoke.texi	16 Jun 2002 19:09:27 -0000	1.152
+++ doc/invoke.texi	28 Jun 2002 06:20:35 -0000
@@ -6904,14 +6904,13 @@ Do not include extra scratch space in fl
 results in smaller code, but slower execution, since scratch space must
 be allocated dynamically.
 
-@cindex @file{varargs.h} and RT PC
 @cindex @file{stdarg.h} and RT PC
 @item -mfp-arg-in-fpregs
 @opindex mfp-arg-in-fpregs
 Use a calling sequence incompatible with the IBM calling convention in
 which floating point arguments are passed in floating point registers.
-Note that @code{varargs.h} and @code{stdarg.h} will not work with
-floating point operands if this option is specified.
+Note that @code{stdarg.h} will not work with floating point operands
+if this option is specified.
 
 @item -mfp-arg-in-gregs
 @opindex mfp-arg-in-gregs
===================================================================
Index: doc/sourcebuild.texi
--- doc/sourcebuild.texi	10 Jun 2002 22:35:56 -0000	1.7
+++ doc/sourcebuild.texi	28 Jun 2002 06:20:35 -0000
@@ -246,8 +246,8 @@ libraries are also installed by GCC; the
 
 Several of the headers GCC installs are in the @file{ginclude}
 directory.  These headers, @file{iso646.h},
-@file{stdarg.h}, @file{stdbool.h}, @file{stddef.h} and
-@file{varargs.h}, are installed in @file{@var{libsubdir}/include},
+@file{stdarg.h}, @file{stdbool.h}, and @file{stddef.h},
+are installed in @file{@var{libsubdir}/include},
 unless the target Makefile fragment (@pxref{Target Fragment})
 overrides this by setting @code{USER_H}.
 
===================================================================
Index: doc/tm.texi
--- doc/tm.texi	27 Jun 2002 17:19:04 -0000	1.143
+++ doc/tm.texi	28 Jun 2002 06:20:38 -0000
@@ -4006,7 +4006,7 @@ arguments.  But usually, on such machine
 yet, because the function prologue itself does all the pushing.)  This
 region is used on machines where an argument may be passed partly in
 registers and partly in memory, and, in some cases to support the
-features in @code{<varargs.h>} and @code{<stdarg.h>}.
+features in @code{<stdarg.h>}.
 
 @item
 An area of memory used to save certain registers used by the function.
===================================================================
Index: doc/trouble.texi
--- doc/trouble.texi	27 Feb 2002 18:47:53 -0000	1.7
+++ doc/trouble.texi	28 Jun 2002 06:20:38 -0000
@@ -892,24 +892,6 @@ You can partially avoid this problem by 
 option (@pxref{Optimize Options}).
 
 @item
-On the MIPS, variable argument functions using @file{varargs.h}
-cannot have a floating point value for the first argument.  The
-reason for this is that in the absence of a prototype in scope,
-if the first argument is a floating point, it is passed in a
-floating point register, rather than an integer register.
-
-If the code is rewritten to use the ISO standard @file{stdarg.h}
-method of variable arguments, and the prototype is in scope at
-the time of the call, everything will work fine.
-
-@item
-On the H8/300 and H8/300H, variable argument functions must be
-implemented using the ISO standard @file{stdarg.h} method of
-variable arguments.  Furthermore, calls to functions using @file{stdarg.h}
-variable arguments must have a prototype for the called function
-in scope at the time of the call.
-
-@item
 On AIX and other platforms without weak symbol support, templates
 need to be instantiated explicitly and symbols for static members
 of templates will not be generated.
===================================================================
Index: ginclude/stdarg.h
--- ginclude/stdarg.h	30 Mar 2000 00:03:14 -0000	1.15
+++ ginclude/stdarg.h	28 Jun 2002 06:20:39 -0000
@@ -51,7 +51,7 @@ typedef __builtin_va_list __gnuc_va_list
    actual type **after default promotions**.
    Thus, va_arg (..., short) is not valid.  */
 
-#define va_start(v,l)	__builtin_stdarg_start((v),l)
+#define va_start(v,l)	__builtin_va_start((v),l)
 #define va_end		__builtin_va_end
 #define va_arg		__builtin_va_arg
 #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
===================================================================
Index: ginclude/varargs.h
--- ginclude/varargs.h	30 Mar 2000 00:03:14 -0000	1.15
+++ ginclude/varargs.h	1 Jan 1970 00:00:00 -0000
@@ -1,144 +0,0 @@
-/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-/* As a special exception, if you include this header file into source
-   files compiled by GCC, this header file does not by itself cause
-   the resulting executable to be covered by the GNU General Public
-   License.  This exception does not however invalidate any other
-   reasons why the executable file might be covered by the GNU General
-   Public License.  */
-
-#ifndef _VARARGS_H
-#define _VARARGS_H
-
-#ifdef __NeXT__
-
-/* On Next, erase any vestiges of stdarg.h.  */
-
-#ifdef _ANSI_STDARG_H_
-#define _VA_LIST_
-#endif
-#define _ANSI_STDARG_H_ 
-
-#undef va_alist
-#undef va_dcl
-#undef va_list
-#undef va_start
-#undef va_end
-#undef va_arg
-#endif  /* __NeXT__ */
-
-/* These macros implement traditional (non-ANSI) varargs
-   for GNU C.  */
-
-#define va_alist  __builtin_va_alist
-
-/* ??? We don't process attributes correctly in K&R argument context.  */
-typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
-
-/* ??? It would be nice to get rid of the ellipsis here.  It causes
-   current_function_varargs to be set in cc1.  */
-#define va_dcl		__builtin_va_alist_t __builtin_va_alist; ...
-
-/* Define __gnuc_va_list, just as in stdarg.h.  */
-
-#ifndef __GNUC_VA_LIST
-#define __GNUC_VA_LIST
-typedef __builtin_va_list __gnuc_va_list;
-#endif
-
-#define va_start(v)	__builtin_varargs_start((v))
-#define va_end		__builtin_va_end
-#define va_arg		__builtin_va_arg
-#define __va_copy(d,s)	__builtin_va_copy((d),(s))
-
-/* Define va_list from __gnuc_va_list.  */
-
-#ifdef _HIDDEN_VA_LIST  /* On OSF1, this means varargs.h is "half-loaded".  */
-#undef _VA_LIST
-#endif
-
-#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
-/* SVR4.2 uses _VA_LIST for an internal alias for va_list,
-   so we must avoid testing it and setting it here.
-   SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
-   have no conflict with that.  */
-#ifndef _VA_LIST_
-#define _VA_LIST_
-#ifdef __i860__
-#ifndef _VA_LIST
-#define _VA_LIST va_list
-#endif
-#endif /* __i860__ */
-typedef __gnuc_va_list va_list;
-#ifdef _SCO_DS
-#define __VA_LIST
-#endif
-#endif /* _VA_LIST_ */
-
-#else /* not __svr4__  || _SCO_DS */
-
-/* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
-   But on BSD NET2 we must not test or define or undef it.
-   (Note that the comments in NET 2's ansi.h
-   are incorrect for _VA_LIST_--see stdio.h!)  */
-/* Michael Eriksson <mer@sics.se> at Thu Sep 30 11:00:57 1993:
-   Sequent defines _VA_LIST_ in <machine/machtypes.h> to be the type to
-   use for va_list (``typedef _VA_LIST_ va_list'') */
-#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
-/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5  */
-#ifndef _VA_LIST_DEFINED
-/* The macro _VA_LIST is used in SCO Unix 3.2.  */
-#ifndef _VA_LIST
-/* The macro _VA_LIST_T_H is used in the Bull dpx2  */
-#ifndef _VA_LIST_T_H
-/* The macro __va_list__ is used by BeOS.  */
-#ifndef __va_list__
-typedef __gnuc_va_list va_list;
-#endif /* not __va_list__ */
-#endif /* not _VA_LIST_T_H */
-#endif /* not _VA_LIST */
-#endif /* not _VA_LIST_DEFINED */
-#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
-#define _VA_LIST_
-#endif
-#ifndef _VA_LIST
-#define _VA_LIST
-#endif
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
-#endif
-#ifndef _VA_LIST_T_H
-#define _VA_LIST_T_H
-#endif
-#ifndef __va_list__
-#define __va_list__
-#endif
-
-#endif /* not _VA_LIST_, except on certain systems */
-
-#endif /* not __svr4__ */
-
-/* The next BSD release (if there is one) wants this symbol to be
-   undefined instead of _VA_LIST_.  */
-#ifdef _BSD_VA_LIST
-#undef _BSD_VA_LIST
-#endif
-
-#endif /* _VARARGS_H */
===================================================================
Index: testsuite/gcc.c-torture/execute/991216-3.c
--- testsuite/gcc.c-torture/execute/991216-3.c	16 Dec 1999 06:13:46 -0000	1.1
+++ testsuite/gcc.c-torture/execute/991216-3.c	28 Jun 2002 06:20:40 -0000
@@ -1,17 +1,16 @@
-#include <varargs.h>
+#include <stdarg.h>
 
 #define VALUE 0x123456789abcdefLL
 #define AFTER 0x55
 
 void
-test (va_alist)
-     va_dcl
+test (int n, ...)
 {
   va_list ap;
-  int i, n;
+  int i;
+
+  va_start (ap, n);
 
-  va_start (ap);
-  n = va_arg (ap, int);
   for (i = 2; i <= n; i++)
     {
       if (va_arg (ap, int) != i)
===================================================================
Index: testsuite/gcc.c-torture/execute/strct-varg-1.c
--- testsuite/gcc.c-torture/execute/strct-varg-1.c	16 Dec 1998 22:16:22 -0000	1.2
+++ testsuite/gcc.c-torture/execute/strct-varg-1.c	28 Jun 2002 06:20:40 -0000
@@ -1,28 +1,14 @@
-#ifdef NO_VARARGS
 #include <stdarg.h>
-#define va_alist int x_attr, ...
-#define va_dcl
-#else
-#include <varargs.h>
-#endif
 
 struct s { int x, y; };
 
-f (va_alist)
-     va_dcl
+f (int attr, ...)
 {
   struct s va_values;
   va_list va;
-  int attr;
   int i;
 
-#ifdef NO_VARARGS
-  va_start (va, x_attr);
-  attr = x_attr;
-#else
-  va_start (va);
-  attr = va_arg (va, int);
-#endif
+  va_start (va, attr);
 
   if (attr != 2)
     abort ();
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-15.c
--- testsuite/gcc.c-torture/execute/va-arg-15.c	3 Apr 2000 21:05:03 -0000	1.1
+++ testsuite/gcc.c-torture/execute/va-arg-15.c	28 Jun 2002 06:20:40 -0000
@@ -1,8 +1,6 @@
-#include <varargs.h>
+#include <stdarg.h>
 
-void vafunction (dummy, va_alist)
-  char *dummy;
-  va_dcl
+void vafunction (char *dummy, ...)
 {
   double darg;
   int iarg;
@@ -10,7 +8,7 @@ void vafunction (dummy, va_alist)
   int i;
   va_list ap;
 
-  va_start(ap);
+  va_start(ap, dummy);
   for (i = 1; i <= 18; i++, flag++) 
     {
       if (flag & 1)
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-16.c
--- testsuite/gcc.c-torture/execute/va-arg-16.c	3 Apr 2000 21:05:03 -0000	1.1
+++ testsuite/gcc.c-torture/execute/va-arg-16.c	28 Jun 2002 06:20:40 -0000
@@ -1,14 +1,12 @@
-#include <varargs.h>
+#include <stdarg.h>
 
 typedef double TYPE;
 
-void vafunction (dummy1, dummy2, va_alist)
-  TYPE dummy1, dummy2;
-  va_dcl
+void vafunction (TYPE dummy1, TYPE dummy2, ...)
 {
   va_list ap;
 
-  va_start(ap);
+  va_start(ap, dummy2);
   if (dummy1 != 888.)
     abort();
   if (dummy2 != 999.)
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-17.c
--- testsuite/gcc.c-torture/execute/va-arg-17.c	3 Apr 2000 21:05:03 -0000	1.1
+++ testsuite/gcc.c-torture/execute/va-arg-17.c	28 Jun 2002 06:20:40 -0000
@@ -1,14 +1,12 @@
-#include <varargs.h>
+#include <stdarg.h>
 
 typedef double TYPE;
 
-void vafunction (dummy, va_alist)
-  char *dummy;
-  va_dcl
+void vafunction (char *dummy, ...)
 {
   va_list ap;
 
-  va_start(ap);
+  va_start(ap, dummy);
   if (va_arg (ap, TYPE) != 1.)
     abort();
   if (va_arg (ap, TYPE) != 2.)
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-19.c
--- testsuite/gcc.c-torture/execute/va-arg-19.c	3 Apr 2000 21:05:03 -0000	1.1
+++ testsuite/gcc.c-torture/execute/va-arg-19.c	28 Jun 2002 06:20:40 -0000
@@ -1,14 +1,12 @@
-#include <varargs.h>
+#include <stdarg.h>
 
 typedef int TYPE;
 
-void vafunction (dummy, va_alist)
-  char *dummy;
-  va_dcl
+void vafunction (char *dummy, ...)
 {
   va_list ap;
 
-  va_start(ap);
+  va_start(ap, dummy);
   if (va_arg (ap, TYPE) != 1)
     abort();
   if (va_arg (ap, TYPE) != 2)
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-3.c
--- testsuite/gcc.c-torture/execute/va-arg-3.c	16 Dec 1998 22:16:34 -0000	1.2
+++ testsuite/gcc.c-torture/execute/va-arg-3.c	1 Jan 1970 00:00:00 -0000
@@ -1,339 +0,0 @@
-/* Same as va-arg-2.c but using varargs.h.  */
-/* The purpose of this test is to catch edge cases when arguments are passed
-   in regs and on the stack.  We test 16 cases, trying to catch multiple
-   targets (some use 3 regs for argument passing, some use 12, etc.).
-   We test both the arguments and the `lastarg' (the argument to va_start).  */
-
-#ifdef NO_VARARGS
-int main()
-{
-  exit (0);
-}
-
-#else
-#include <varargs.h>
-
-extern __SIZE_TYPE__ strlen ();
-
-int
-to_hex (unsigned int a)
-{
-  static char hex[] = "0123456789abcdef";
-
-  if (a > 15)
-    abort ();
-  return hex[a];
-}
-
-void
-f0 (va_alist)
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 0)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f1 (a1, va_alist)
-     int a1;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 1)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f2 (a1, a2, va_alist)
-     int a1, a2;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 2)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f3 (a1, a2, a3, va_alist)
-     int a1, a2, a3;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 3)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f4 (a1, a2, a3, a4, va_alist)
-     int a1, a2, a3, a4;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 4)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f5 (a1, a2, a3, a4, a5, va_alist)
-     int a1, a2, a3, a4, a5;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 5)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f6 (a1, a2, a3, a4, a5, a6, va_alist)
-     int a1, a2, a3, a4, a5, a6;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 6)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f7 (a1, a2, a3, a4, a5, a6, a7, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 7)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f8 (a1, a2, a3, a4, a5, a6, a7, a8, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 8)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f9 (a1, a2, a3, a4, a5, a6, a7, a8, a9, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8, a9;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 9)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f10 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 10)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f11 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11,
-     va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 11)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f12 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 12)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f13 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 13)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f14 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 14)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-void
-f15 (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, va_alist)
-     int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15;
-     va_dcl
-{
-  va_list ap;
-  char *format;
-
-  va_start (ap);
-  format = va_arg (ap, char *);
-  if (strlen (format) != 16 - 15)
-    abort ();
-  while (*format)
-    if (*format++ != to_hex (va_arg (ap, int)))
-      abort ();
-  va_end(ap);
-}
-
-main ()
-{
-  char *f = "0123456789abcdef";
-
-  f0 (f+0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f1 (0, f+1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f2 (0, 1, f+2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f3 (0, 1, 2, f+3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f4 (0, 1, 2, 3, f+4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f5 (0, 1, 2, 3, 4, f+5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f6 (0, 1, 2, 3, 4, 5, f+6, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f7 (0, 1, 2, 3, 4, 5, 6, f+7, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  f8 (0, 1, 2, 3, 4, 5, 6, 7, f+8, 8, 9, 10, 11, 12, 13, 14, 15);
-  f9 (0, 1, 2, 3, 4, 5, 6, 7, 8, f+9, 9, 10, 11, 12, 13, 14, 15);
-  f10 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, f+10, 10, 11, 12, 13, 14, 15);
-  f11 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, f+11, 11, 12, 13, 14, 15);
-  f12 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, f+12, 12, 13, 14, 15);
-  f13 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, f+13, 13, 14, 15);
-  f14 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, f+14, 14, 15);
-  f15 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, f+15, 15);
-
-  exit (0);
-}
-#endif /* ! NO_VARARGS */
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-3.x
--- testsuite/gcc.c-torture/execute/va-arg-3.x	16 Dec 1998 22:16:35 -0000	1.3
+++ testsuite/gcc.c-torture/execute/va-arg-3.x	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-# This doesn't work on mn10200
-
-if { [istarget "mn10200*-*-*"] } {
-	set torture_execute_xfail "mn10200*-*-*"
-}
-
-if { [istarget "h8300*-*-*"] } {
-	set torture_execute_xfail "h8300*-*-*"
-}
-
-
-return 0
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-7.c
--- testsuite/gcc.c-torture/execute/va-arg-7.c	4 Sep 1999 15:09:13 -0000	1.2
+++ testsuite/gcc.c-torture/execute/va-arg-7.c	28 Jun 2002 06:20:40 -0000
@@ -1,16 +1,15 @@
 /* Origin: Franz Sirl <Franz.Sirl-kernel@lauterbach.com> */
 
-#include <varargs.h>
+#include <stdarg.h>
 
 inline void
-debug(i1, i2, i3, i4, i5, i6, i7, f1, f2, f3, f4, f5, f6, f7, f8, f9, va_alist)
-     int i1, i2, i3, i4, i5, i6, i7;
-     double f1, f2, f3, f4, f5, f6, f7, f8, f9;
-     va_dcl
+debug(int i1, int i2, int i3, int i4, int i5, int i6, int i7,
+      double f1, double f2, double f3, double f4, double f5,
+      double f6, double f7, double f8, double f9, ...)
 {
   va_list ap;
 
-  va_start (ap);
+  va_start (ap, f9);
 
   if (va_arg (ap,int) != 8)
     abort ();
@@ -25,7 +24,8 @@ debug(i1, i2, i3, i4, i5, i6, i7, f1, f2
 int
 main(void)
 {
-  debug (1, 2, 3, 4, 5, 6, 7, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
-         8.0, 9.0, 8, 9, 10);
+  debug (1, 2, 3, 4, 5, 6, 7,
+	 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,
+	 8, 9, 10);
   exit (0);
 }
===================================================================
Index: testsuite/gcc.c-torture/execute/va-arg-8.c
--- testsuite/gcc.c-torture/execute/va-arg-8.c	4 Sep 1999 15:09:13 -0000	1.2
+++ testsuite/gcc.c-torture/execute/va-arg-8.c	28 Jun 2002 06:20:40 -0000
@@ -1,6 +1,6 @@
 /* Origin: Franz Sirl <Franz.Sirl-kernel@lauterbach.com> */
 
-#include <varargs.h>
+#include <stdarg.h>
 #include <limits.h>
 
 #if __LONG_LONG_MAX__ == 9223372036854775807LL
@@ -8,13 +8,12 @@
 typedef long long int INT64;
 
 inline void
-debug(i1, i2, i3, i4, i5, i6, i7, i8, i9, va_alist)
-     int i1, i2, i3, i4, i5, i6, i7, i8, i9;
-     va_dcl
+debug(int i1, int i2, int i3, int i4, int i5,
+      int i6, int i7, int i8, int i9, ...)
 {
   va_list ap;
 
-  va_start (ap);
+  va_start (ap, i9);
 
   if (va_arg (ap,int) != 10)
     abort ();
===================================================================
Index: testsuite/lib/gcc.exp
--- testsuite/lib/gcc.exp	4 Feb 2002 05:00:25 -0000	1.8
+++ testsuite/lib/gcc.exp	28 Jun 2002 06:20:40 -0000
@@ -149,9 +149,6 @@ proc gcc_target_compile { source dest ty
     if [info exists TOOL_OPTIONS] {
 	lappend options "additional_flags=$TOOL_OPTIONS"
     }
-    if [target_info exists gcc,no_varargs] {
-	lappend options "additional_flags=-DNO_VARARGS"
-    }
     if [target_info exists gcc,timeout] {
 	lappend options "timeout=[target_info gcc,timeout]"
     }
===================================================================
Index: testsuite/lib/objc.exp
--- testsuite/lib/objc.exp	9 May 2002 21:01:53 -0000	1.13
+++ testsuite/lib/objc.exp	28 Jun 2002 06:20:40 -0000
@@ -164,9 +164,6 @@ proc objc_target_compile { source dest t
     if [info exists TOOL_OPTIONS] {
 	lappend options "additional_flags=$TOOL_OPTIONS"
     }
-    if [target_info exists objc,no_varargs] {
-	lappend options "additional_flags=-DNO_VARARGS"
-    }
     set objcpath "[get_multilibs]"
     set libobjc_dir [lookfor_file ${objcpath} libobjc/.libs/libobjc.a]
     if { $libobjc_dir != "" } {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]