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]

Patch installed to eliminate libiberty VA_ macro usage


Patch converts code to ISO C, eliminating libiberty VA_ macros.
Bootstrapped on sparc-sun-solaris2.7, no regressions.

Installed as "obvious".

2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* builtins.c (validate_arglist): Eliminate libiberty VA_ macros,
	always use stdarg.
	* c-errors.c (pedwarn_c99): Likewise.
	* c-format.c (status_warning): Likewise.
	* c-semantics.c (build_stmt): Likewise.
	* calls.c (emit_library_call, emit_library_call_value): Likewise.
	* collect2.c (notice, fatal_perror, fatal, error): Likewise.
	* cpperror.c (cpp_error, cpp_error_with_line): Likewise.
	* diagnostic.c (build_message_string, output_printf,
	output_verbatim, verbatim, inform, warning, pedwarn, error, sorry,
	fatal_error, internal_error, warning_with_decl, pedwarn_with_decl,
	error_with_decl, fnotice): Likewise.
	* dwarf2asm.c (dw2_asm_output_data, dw2_asm_output_delta,
	dw2_asm_output_offset, dw2_asm_output_pcrel, dw2_asm_output_addr,
	dw2_asm_output_addr_rtx, dw2_asm_output_nstring,
	dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128,
	dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
	dw2_asm_output_encoded_addr_rtx): Likewise.
	* emit-rtl.c (gen_rtx, gen_rtvec): Likewise.
	* errors.c (warning, error, fatal, internal_error): Likewise.
	* final.c (output_operand_lossage, asm_fprintf): Likewise.
	* fix-header.c (fatal): Likewise.
	* gcc.c (fatal, error, notice): Likewise.
	* gcov.c (fnotice): Likewise.
	* genattrtab.c (attr_rtx, attr_printf): Likewise.
	* gengtype.c (error_at_line, xasprintf, oprintf): Likewise.
	* gensupport.c (message_with_line): Likewise.
	* mips-tfile.c (fatal, error): Likewise.
	* protoize.c (notice): Likewise.
	* ra-debug.c (ra_debug_msg): Likewise.
	* read-rtl.c (fatal_with_file_and_line): Likewise.
	* rtl-error.c (error_for_asm, warning_for_asm): Likewise.
	* tree.c (build, build_nt, build_function_type_list): Likewise.

cp:
	* error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
	libiberty VA_ macros, always use stdarg.
	* rtti.c (create_pseudo_type_info): Likewise.
	* tree.c (build_min_nt, build_min): Likewise.

diff -rup orig/egcc-CVS20030516/gcc/builtins.c egcc-CVS20030516/gcc/builtins.c
--- orig/egcc-CVS20030516/gcc/builtins.c	2003-05-08 09:41:36.000000000 -0400
+++ egcc-CVS20030516/gcc/builtins.c	2003-05-17 10:32:27.000676345 -0400
@@ -5368,13 +5368,13 @@ build_function_call_expr (fn, arglist)
    ellipses, otherwise the last specifier must be a VOID_TYPE.  */
 
 static int
-validate_arglist VPARAMS ((tree arglist, ...))
+validate_arglist (tree arglist, ...)
 {
   enum tree_code code;
   int res = 0;
-
-  VA_OPEN (ap, arglist);
-  VA_FIXEDARG (ap, tree, arglist);
+  va_list ap;
+  
+  va_start (ap, arglist);
 
   do
     {
@@ -5406,7 +5406,7 @@ validate_arglist VPARAMS ((tree arglist,
   /* We need gotos here since we can only have one VA_CLOSE in a
      function.  */
  end: ;
-  VA_CLOSE (ap);
+  va_end (ap);
 
   return res;
 }
diff -rup orig/egcc-CVS20030516/gcc/c-errors.c egcc-CVS20030516/gcc/c-errors.c
--- orig/egcc-CVS20030516/gcc/c-errors.c	2003-05-01 21:01:16.000000000 -0400
+++ egcc-CVS20030516/gcc/c-errors.c	2003-05-17 10:32:04.782696933 -0400
@@ -32,14 +32,14 @@ Software Foundation, 59 Temple Place - S
 /* Issue an ISO C99 pedantic warning MSGID.  */
 
 void
-pedwarn_c99 VPARAMS ((const char *msgid, ...))
+pedwarn_c99 (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                        flag_isoc99 ? pedantic_error_kind () : DK_WARNING);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
diff -rup orig/egcc-CVS20030516/gcc/c-format.c egcc-CVS20030516/gcc/c-format.c
--- orig/egcc-CVS20030516/gcc/c-format.c	2003-05-01 21:01:16.000000000 -0400
+++ egcc-CVS20030516/gcc/c-format.c	2003-05-17 10:31:42.734677991 -0400
@@ -996,13 +996,12 @@ check_function_format (status, attrs, pa
    it warns as usual by replicating the innards of the warning
    function from diagnostic.c.  */
 static void
-status_warning VPARAMS ((int *status, const char *msgid, ...))
+status_warning (int *status, const char *msgid, ...)
 {
   diagnostic_info diagnostic ;
-
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, int *, status);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+  
+  va_start (ap, msgid);
 
   if (status)
     *status = 1;
@@ -1014,7 +1013,7 @@ status_warning VPARAMS ((int *status, co
       report_diagnostic (&diagnostic);
     }
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Variables used by the checking of $ operand number formats.  */
diff -rup orig/egcc-CVS20030516/gcc/c-semantics.c egcc-CVS20030516/gcc/c-semantics.c
--- orig/egcc-CVS20030516/gcc/c-semantics.c	2003-05-13 20:01:28.000000000 -0400
+++ egcc-CVS20030516/gcc/c-semantics.c	2003-05-17 10:31:18.726844367 -0400
@@ -193,14 +193,14 @@ finish_stmt_tree (t)
    in the grammar.  */
 
 tree
-build_stmt VPARAMS ((enum tree_code code, ...))
+build_stmt (enum tree_code code, ...)
 {
   tree t;
   int length;
   int i;
-
-  VA_OPEN (p, code);
-  VA_FIXEDARG (p, enum tree_code, code);
+  va_list p;
+  
+  va_start (p, code);
 
   t = make_node (code);
   length = TREE_CODE_LENGTH (code);
@@ -209,7 +209,7 @@ build_stmt VPARAMS ((enum tree_code code
   for (i = 0; i < length; i++)
     TREE_OPERAND (t, i) = va_arg (p, tree);
 
-  VA_CLOSE (p);
+  va_end (p);
   return t;
 }
 
diff -rup orig/egcc-CVS20030516/gcc/calls.c egcc-CVS20030516/gcc/calls.c
--- orig/egcc-CVS20030516/gcc/calls.c	2003-05-03 23:16:34.000000000 -0400
+++ egcc-CVS20030516/gcc/calls.c	2003-05-17 10:30:44.049993247 -0400
@@ -4171,18 +4171,14 @@ emit_library_call_value_1 (retval, orgfu
    or other LCT_ value for other types of library calls.  */
 
 void
-emit_library_call VPARAMS((rtx orgfun, enum libcall_type fn_type,
-			   enum machine_mode outmode, int nargs, ...))
+emit_library_call (rtx orgfun, enum libcall_type fn_type,
+		   enum machine_mode outmode, int nargs, ...)
 {
-  VA_OPEN (p, nargs);
-  VA_FIXEDARG (p, rtx, orgfun);
-  VA_FIXEDARG (p, int, fn_type);
-  VA_FIXEDARG (p, enum machine_mode, outmode);
-  VA_FIXEDARG (p, int, nargs);
-
+  va_list p;
+  
+  va_start (p, nargs);
   emit_library_call_value_1 (0, orgfun, NULL_RTX, fn_type, outmode, nargs, p);
-
-  VA_CLOSE (p);
+  va_end (p);
 }
 
 /* Like emit_library_call except that an extra argument, VALUE,
@@ -4194,23 +4190,17 @@ emit_library_call VPARAMS((rtx orgfun, e
    If VALUE is nonzero, VALUE is returned.  */
 
 rtx
-emit_library_call_value VPARAMS((rtx orgfun, rtx value,
-				 enum libcall_type fn_type,
-				 enum machine_mode outmode, int nargs, ...))
+emit_library_call_value (rtx orgfun, rtx value,
+			 enum libcall_type fn_type,
+			 enum machine_mode outmode, int nargs, ...)
 {
   rtx result;
+  va_list p;
   
-  VA_OPEN (p, nargs);
-  VA_FIXEDARG (p, rtx, orgfun);
-  VA_FIXEDARG (p, rtx, value);
-  VA_FIXEDARG (p, int, fn_type);
-  VA_FIXEDARG (p, enum machine_mode, outmode);
-  VA_FIXEDARG (p, int, nargs);
-
+  va_start (p, nargs);
   result = emit_library_call_value_1 (1, orgfun, value, fn_type, outmode,
 				      nargs, p);
-
-  VA_CLOSE (p);
+  va_end (p);
 
   return result;
 }
diff -rup orig/egcc-CVS20030516/gcc/collect2.c egcc-CVS20030516/gcc/collect2.c
--- orig/egcc-CVS20030516/gcc/collect2.c	2003-03-30 13:54:31.000000000 -0500
+++ egcc-CVS20030516/gcc/collect2.c	2003-05-17 10:29:11.598296177 -0400
@@ -360,29 +360,28 @@ collect_exit (status)
 
 /* Notify user of a non-error.  */
 void
-notice VPARAMS ((const char *msgid, ...))
+notice (const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   vfprintf (stderr, _(msgid), ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Die when sys call fails.  */
 
 void
-fatal_perror VPARAMS ((const char * msgid, ...))
+fatal_perror (const char * msgid, ...)
 {
   int e = errno;
-
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   fprintf (stderr, "collect2: ");
   vfprintf (stderr, _(msgid), ap);
   fprintf (stderr, ": %s\n", xstrerror (e));
-  VA_CLOSE (ap);
+  va_end (ap);
 
   collect_exit (FATAL_EXIT_CODE);
 }
@@ -390,15 +389,15 @@ fatal_perror VPARAMS ((const char * msgi
 /* Just die.  */
 
 void
-fatal VPARAMS ((const char * msgid, ...))
+fatal (const char * msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
   
+  va_start (ap, msgid);
   fprintf (stderr, "collect2: ");
   vfprintf (stderr, _(msgid), ap);
   fprintf (stderr, "\n");
-  VA_CLOSE (ap);
+  va_end (ap);
 
   collect_exit (FATAL_EXIT_CODE);
 }
@@ -406,15 +405,15 @@ fatal VPARAMS ((const char * msgid, ...)
 /* Write error message.  */
 
 void
-error VPARAMS ((const char * msgid, ...))
+error (const char * msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   fprintf (stderr, "collect2: ");
   vfprintf (stderr, _(msgid), ap);
   fprintf (stderr, "\n");
-  VA_CLOSE(ap);
+  va_end(ap);
 }
 
 /* In case obstack is linked in, and abort is defined to fancy_abort,
diff -rup orig/egcc-CVS20030516/gcc/cp/error.c egcc-CVS20030516/gcc/cp/error.c
--- orig/egcc-CVS20030516/gcc/cp/error.c	2003-05-03 23:17:14.000000000 -0400
+++ egcc-CVS20030516/gcc/cp/error.c	2003-05-17 09:58:56.292551679 -0400
@@ -2607,62 +2607,56 @@ locate_error (const char *msgid, va_list
 
 
 void
-cp_error_at VPARAMS ((const char *msgid, ...))
+cp_error_at (const char *msgid, ...)
 {
   tree here;
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_start (ap, msgid);
   here = locate_error (msgid, ap);
-  VA_CLOSE (ap);
-
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_end (ap);
 
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap,
                        cp_file_of (here), cp_line_of (here), DK_ERROR);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-cp_warning_at VPARAMS ((const char *msgid, ...))
+cp_warning_at (const char *msgid, ...)
 {
   tree here;
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_start (ap, msgid);
   here = locate_error (msgid, ap);
-  VA_CLOSE (ap);
-
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_end (ap);
 
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap,
                        cp_file_of (here), cp_line_of (here), DK_WARNING);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-cp_pedwarn_at VPARAMS ((const char *msgid, ...))
+cp_pedwarn_at (const char *msgid, ...)
 {
   tree here;
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_start (ap, msgid);
   here = locate_error (msgid, ap);
-  VA_CLOSE (ap);
-
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_end (ap);
 
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap,
                        cp_file_of (here), cp_line_of (here),
                        pedantic_error_kind());
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
diff -rup orig/egcc-CVS20030516/gcc/cp/rtti.c egcc-CVS20030516/gcc/cp/rtti.c
--- orig/egcc-CVS20030516/gcc/cp/rtti.c	2003-04-22 16:01:32.000000000 -0400
+++ egcc-CVS20030516/gcc/cp/rtti.c	2003-05-17 09:55:07.792661618 -0400
@@ -1124,10 +1124,9 @@ create_pseudo_type_info (const char *rea
   tree fields;
   tree field_decl;
   tree result;
+  va_list ap;
 
-  VA_OPEN (ap, ident);
-  VA_FIXEDARG (ap, const char *, real_name);
-  VA_FIXEDARG (ap, int, ident);
+  va_start (ap, ident);
 
   /* Generate the pseudo type name.  */
   pseudo_name = (char *)alloca (strlen (real_name) + 30);
@@ -1156,7 +1155,7 @@ create_pseudo_type_info (const char *rea
   TINFO_PSEUDO_TYPE (result) =
     cp_build_qualified_type (pseudo_type, TYPE_QUAL_CONST);
   
-  VA_CLOSE (ap);
+  va_end (ap);
   return result;
 }
 
diff -rup orig/egcc-CVS20030516/gcc/cp/tree.c egcc-CVS20030516/gcc/cp/tree.c
--- orig/egcc-CVS20030516/gcc/cp/tree.c	2003-05-16 21:37:50.000000000 -0400
+++ egcc-CVS20030516/gcc/cp/tree.c	2003-05-17 09:55:46.779163383 -0400
@@ -1500,14 +1500,14 @@ break_out_target_exprs (t)
    current line number.  */
 
 tree
-build_min_nt VPARAMS ((enum tree_code code, ...))
+build_min_nt (enum tree_code code, ...)
 {
   register tree t;
   register int length;
   register int i;
+  va_list p;
 
-  VA_OPEN (p, code);
-  VA_FIXEDARG (p, enum tree_code, code);
+  va_start (p, code);
 
   t = make_node (code);
   length = TREE_CODE_LENGTH (code);
@@ -1519,7 +1519,7 @@ build_min_nt VPARAMS ((enum tree_code co
       TREE_OPERAND (t, i) = x;
     }
 
-  VA_CLOSE (p);
+  va_end (p);
   return t;
 }
 
@@ -1527,15 +1527,14 @@ build_min_nt VPARAMS ((enum tree_code co
    line-number.  */
 
 tree
-build_min VPARAMS ((enum tree_code code, tree tt, ...))
+build_min (enum tree_code code, tree tt, ...)
 {
   register tree t;
   register int length;
   register int i;
+  va_list p;
 
-  VA_OPEN (p, tt);
-  VA_FIXEDARG (p, enum tree_code, code);
-  VA_FIXEDARG (p, tree, tt);
+  va_start (p, tt);
 
   t = make_node (code);
   length = TREE_CODE_LENGTH (code);
@@ -1548,7 +1547,7 @@ build_min VPARAMS ((enum tree_code code,
       TREE_OPERAND (t, i) = x;
     }
 
-  VA_CLOSE (p);
+  va_end (p);
   return t;
 }
 
diff -rup orig/egcc-CVS20030516/gcc/cpperror.c egcc-CVS20030516/gcc/cpperror.c
--- orig/egcc-CVS20030516/gcc/cpperror.c	2002-12-16 13:19:14.000000000 -0500
+++ egcc-CVS20030516/gcc/cpperror.c	2003-05-17 10:26:47.411354910 -0400
@@ -128,14 +128,12 @@ _cpp_begin_message (pfile, code, line, c
 
 /* Print an error at the location of the previously lexed token.  */
 void
-cpp_error VPARAMS ((cpp_reader * pfile, int level, const char *msgid, ...))
+cpp_error (cpp_reader * pfile, int level, const char *msgid, ...)
 {
   unsigned int line, column;
-
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, cpp_reader *, pfile);
-  VA_FIXEDARG (ap, int, level);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+  
+  va_start (ap, msgid);
 
   if (pfile->buffer)
     {
@@ -159,26 +157,23 @@ cpp_error VPARAMS ((cpp_reader * pfile, 
   if (_cpp_begin_message (pfile, level, line, column))
     v_message (msgid, ap);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Print an error at a specific location.  */
 void
-cpp_error_with_line VPARAMS ((cpp_reader *pfile, int level,
-			      unsigned int line, unsigned int column,
-			      const char *msgid, ...))
+cpp_error_with_line (cpp_reader *pfile, int level,
+		     unsigned int line, unsigned int column,
+		     const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, cpp_reader *, pfile);
-  VA_FIXEDARG (ap, int, level);
-  VA_FIXEDARG (ap, unsigned int, line);
-  VA_FIXEDARG (ap, unsigned int, column);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+  
+  va_start (ap, msgid);
 
   if (_cpp_begin_message (pfile, level, line, column))
     v_message (msgid, ap);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
diff -rup orig/egcc-CVS20030516/gcc/diagnostic.c egcc-CVS20030516/gcc/diagnostic.c
--- orig/egcc-CVS20030516/gcc/diagnostic.c	2003-05-13 20:01:28.000000000 -0400
+++ egcc-CVS20030516/gcc/diagnostic.c	2003-05-17 10:25:28.148537576 -0400
@@ -636,16 +636,14 @@ output_format (buffer, text)
 /* Return a malloc'd string containing MSG formatted a la printf.  The
    caller is responsible for freeing the memory.  */
 static char *
-build_message_string VPARAMS ((const char *msg, ...))
+build_message_string (const char *msg, ...)
 {
   char *str;
+  va_list ap;
 
-  VA_OPEN (ap, msg);
-  VA_FIXEDARG (ap, const char *, msg);
-
+  va_start (ap, msg);
   vasprintf (&str, msg, ap);
-
-  VA_CLOSE (ap);
+  va_end (ap);
 
   return str;
 }
@@ -660,18 +658,17 @@ file_name_as_prefix (f)
 
 /* Format a message into BUFFER a la printf.  */
 void
-output_printf VPARAMS ((struct output_buffer *buffer, const char *msgid, ...))
+output_printf (struct output_buffer *buffer, const char *msgid, ...)
 {
   text_info text;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, output_buffer *, buffer);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
 
+  va_start (ap, msgid);
   text.err_no = errno;
   text.args_ptr = &ap;
   text.format_spec = _(msgid);
   output_format (buffer, &text);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Print a message relevant to the given DECL.  */
@@ -756,18 +753,17 @@ output_do_verbatim (buffer, text)
 
 /* Output MESSAGE verbatim into BUFFER.  */
 void
-output_verbatim VPARAMS ((output_buffer *buffer, const char *msgid, ...))
+output_verbatim (output_buffer *buffer, const char *msgid, ...)
 {
   text_info text;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, output_buffer *, buffer);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
 
+  va_start (ap, msgid);
   text.err_no = errno;
   text.args_ptr = &ap;
   text.format_spec = _(msgid);
   output_do_verbatim (buffer, &text);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 
@@ -1184,50 +1180,48 @@ trim_filename (name)
 /* Text to be emitted verbatim to the error message stream; this
    produces no prefix and disables line-wrapping.  Use rarely.  */
 void
-verbatim VPARAMS ((const char *msgid, ...))
+verbatim (const char *msgid, ...)
 {
   text_info text;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
 
+  va_start (ap, msgid);
   text.err_no = errno;
   text.args_ptr = &ap;
   text.format_spec = _(msgid);
   output_do_verbatim (&global_dc->buffer, &text);
   output_buffer_to_stream (&global_dc->buffer);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* An informative note.  Use this for additional details on an error
    message.  */
 void
-inform VPARAMS ((const char *msgid, ...))
+inform (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                        DK_NOTE);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* A warning.  Use this for code which is correct according to the
    relevant language specification but is likely to be buggy anyway.  */
 void
-warning VPARAMS ((const char *msgid, ...))
+warning (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                        DK_WARNING);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* A "pedantic" warning: issues a warning unless -pedantic-errors was
@@ -1239,66 +1233,63 @@ warning VPARAMS ((const char *msgid, ...
    of the -pedantic command-line switch.  To get a warning enabled
    only with that switch, write "if (pedantic) pedwarn (...);"  */
 void
-pedwarn VPARAMS ((const char *msgid, ...))
+pedwarn (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
 
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                        pedantic_error_kind ());
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* A hard error: the code is definitely ill-formed, and an object file
    will not be produced.  */
 void
-error VPARAMS ((const char *msgid, ...))
+error (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                        DK_ERROR);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* "Sorry, not implemented."  Use for a language feature which is
    required by the relevant specification but not implemented by GCC.
    An object file will not be produced.  */
 void
-sorry VPARAMS ((const char *msgid, ...))
+sorry (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
 		       DK_SORRY);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* An error which is severe enough that we make no attempt to
    continue.  Do not use this for internal consistency checks; that's
    internal_error.  Use of this function should be rare.  */
 void
-fatal_error VPARAMS ((const char *msgid, ...))
+fatal_error (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                        DK_FATAL);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 
   /* NOTREACHED */
   real_abort ();
@@ -1309,17 +1300,16 @@ fatal_error VPARAMS ((const char *msgid,
    a more specific message, or some other good reason, you should use
    abort () instead of calling this function directly.  */
 void
-internal_error VPARAMS ((const char *msgid, ...))
+internal_error (const char *msgid, ...)
 {
   diagnostic_info diagnostic;
+  va_list ap;
 
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap, input_filename, input_line,
                        DK_ICE);
   report_diagnostic (&diagnostic);
-  VA_CLOSE (ap);
+  va_end (ap);
 
   /* NOTREACHED */
   real_abort ();
@@ -1329,12 +1319,12 @@ internal_error VPARAMS ((const char *msg
    DECL node.  These are deprecated.  */
 
 void
-warning_with_decl VPARAMS ((tree decl, const char *msgid, ...))
+warning_with_decl (tree decl, const char *msgid, ...)
 {
   diagnostic_info diagnostic;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, tree, decl);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+
+  va_start (ap, msgid);
 
   /* Do not issue a warning about a decl which came from a system header,
      unless -Wsystem-headers.  */
@@ -1345,16 +1335,16 @@ warning_with_decl VPARAMS ((tree decl, c
                        DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl),
                        DK_WARNING);
   diagnostic_for_decl (global_dc, &diagnostic, decl);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-pedwarn_with_decl VPARAMS ((tree decl, const char *msgid, ...))
+pedwarn_with_decl (tree decl, const char *msgid, ...)
 {
   diagnostic_info diagnostic;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, tree, decl);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+
+  va_start (ap, msgid);
 
   /* Do not issue a warning about a decl which came from a system header,
      unless -Wsystem-headers.  */
@@ -1366,22 +1356,21 @@ pedwarn_with_decl VPARAMS ((tree decl, c
                        pedantic_error_kind ());
   diagnostic_for_decl (global_dc, &diagnostic, decl);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-error_with_decl VPARAMS ((tree decl, const char *msgid, ...))
+error_with_decl (tree decl, const char *msgid, ...)
 {
   diagnostic_info diagnostic;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, tree, decl);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
 
+  va_start (ap, msgid);
   diagnostic_set_info (&diagnostic, msgid, &ap,
                        DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl),
                        DK_ERROR);
   diagnostic_for_decl (global_dc, &diagnostic, decl);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Special case error functions.  Most are implemented in terms of the
@@ -1390,14 +1379,13 @@ error_with_decl VPARAMS ((tree decl, con
 /* Print a diagnostic MSGID on FILE.  This is just fprintf, except it
    runs its second argument through gettext.  */
 void
-fnotice VPARAMS ((FILE *file, const char *msgid, ...))
+fnotice (FILE *file, const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, FILE *, file);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
 
+  va_start (ap, msgid);
   vfprintf (file, _(msgid), ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Warn about a use of an identifier which was marked deprecated.  */
diff -rup orig/egcc-CVS20030516/gcc/dwarf2asm.c egcc-CVS20030516/gcc/dwarf2asm.c
--- orig/egcc-CVS20030516/gcc/dwarf2asm.c	2003-05-16 21:37:50.000000000 -0400
+++ egcc-CVS20030516/gcc/dwarf2asm.c	2003-05-17 10:21:32.560045915 -0400
@@ -67,13 +67,12 @@ dw2_assemble_integer (size, x)
 /* Output an immediate constant in a given size.  */
 
 void
-dw2_asm_output_data VPARAMS ((int size, unsigned HOST_WIDE_INT value,
-			      const char *comment, ...))
+dw2_asm_output_data (int size, unsigned HOST_WIDE_INT value,
+		     const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, int, size);
-  VA_FIXEDARG (ap, unsigned HOST_WIDE_INT, value);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
   if (size * 8 < HOST_BITS_PER_WIDE_INT)
     value &= ~(~(unsigned HOST_WIDE_INT) 0 << (size * 8));
@@ -87,7 +86,7 @@ dw2_asm_output_data VPARAMS ((int size, 
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Output the difference between two symbols in a given size.  */
@@ -97,14 +96,12 @@ dw2_asm_output_data VPARAMS ((int size, 
    symbol must appear after both symbols are defined.  */
 
 void
-dw2_asm_output_delta VPARAMS ((int size, const char *lab1, const char *lab2,
-			       const char *comment, ...))
+dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
+		      const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, int, size);
-  VA_FIXEDARG (ap, const char *, lab1);
-  VA_FIXEDARG (ap, const char *, lab2);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
 #ifdef ASM_OUTPUT_DWARF_DELTA
   ASM_OUTPUT_DWARF_DELTA (asm_out_file, size, lab1, lab2);
@@ -121,7 +118,7 @@ dw2_asm_output_delta VPARAMS ((int size,
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Output a section-relative reference to a label.  In general this
@@ -131,13 +128,12 @@ dw2_asm_output_delta VPARAMS ((int size,
    Some targets have special relocations for this that we must use.  */
 
 void
-dw2_asm_output_offset VPARAMS ((int size, const char *label,
-			       const char *comment, ...))
+dw2_asm_output_offset (int size, const char *label,
+		       const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, int, size);
-  VA_FIXEDARG (ap, const char *, label);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
 #ifdef ASM_OUTPUT_DWARF_OFFSET
   ASM_OUTPUT_DWARF_OFFSET (asm_out_file, size, label);
@@ -152,21 +148,20 @@ dw2_asm_output_offset VPARAMS ((int size
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Output a self-relative reference to a label, possibly in a
    different section or object file.  */
 
 void
-dw2_asm_output_pcrel VPARAMS ((int size ATTRIBUTE_UNUSED,
-			       const char *label ATTRIBUTE_UNUSED,
-			       const char *comment, ...))
-{
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, int, size);
-  VA_FIXEDARG (ap, const char *, label);
-  VA_FIXEDARG (ap, const char *, comment);
+dw2_asm_output_pcrel (int size ATTRIBUTE_UNUSED,
+		      const char *label ATTRIBUTE_UNUSED,
+		      const char *comment, ...)
+{
+  va_list ap;
+  
+  va_start (ap, comment);
 
 #ifdef ASM_OUTPUT_DWARF_PCREL
   ASM_OUTPUT_DWARF_PCREL (asm_out_file, size, label);
@@ -184,19 +179,18 @@ dw2_asm_output_pcrel VPARAMS ((int size 
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Output an absolute reference to a label.  */
 
 void
-dw2_asm_output_addr VPARAMS ((int size, const char *label,
-			      const char *comment, ...))
+dw2_asm_output_addr (int size, const char *label,
+		     const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, int, size);
-  VA_FIXEDARG (ap, const char *, label);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
   dw2_assemble_integer (size, gen_rtx_SYMBOL_REF (Pmode, label));
 
@@ -207,19 +201,18 @@ dw2_asm_output_addr VPARAMS ((int size, 
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Similar, but use an RTX expression instead of a text label.  */
 
 void
-dw2_asm_output_addr_rtx VPARAMS ((int size, rtx addr,
-				  const char *comment, ...))
+dw2_asm_output_addr_rtx (int size, rtx addr,
+			 const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, int, size);
-  VA_FIXEDARG (ap, rtx, addr);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
   dw2_assemble_integer (size, addr);
 
@@ -230,19 +223,17 @@ dw2_asm_output_addr_rtx VPARAMS ((int si
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-dw2_asm_output_nstring VPARAMS ((const char *str, size_t orig_len,
-				 const char *comment, ...))
+dw2_asm_output_nstring (const char *str, size_t orig_len,
+			const char *comment, ...)
 {
   size_t i, len;
+  va_list ap;
 
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, const char *, str);
-  VA_FIXEDARG (ap, size_t, orig_len);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_start (ap, comment);
 
   len = orig_len;
 
@@ -277,7 +268,7 @@ dw2_asm_output_nstring VPARAMS ((const c
 	assemble_integer (const0_rtx, 1, BITS_PER_UNIT, 1);
     }
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 
@@ -506,12 +497,12 @@ eh_data_format_name (format)
 /* Output an unsigned LEB128 quantity.  */
 
 void
-dw2_asm_output_data_uleb128 VPARAMS ((unsigned HOST_WIDE_INT value,
-				      const char *comment, ...))
+dw2_asm_output_data_uleb128 (unsigned HOST_WIDE_INT value,
+			     const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, unsigned HOST_WIDE_INT, value);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
 #ifdef HAVE_AS_LEB128
   fprintf (asm_out_file, "\t.uleb128 " HOST_WIDE_INT_PRINT_HEX , value);
@@ -561,18 +552,18 @@ dw2_asm_output_data_uleb128 VPARAMS ((un
 #endif
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Output a signed LEB128 quantity.  */
 
 void
-dw2_asm_output_data_sleb128 VPARAMS ((HOST_WIDE_INT value,
-				      const char *comment, ...))
+dw2_asm_output_data_sleb128 (HOST_WIDE_INT value,
+			     const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, HOST_WIDE_INT, value);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
 #ifdef HAVE_AS_LEB128
   fprintf (asm_out_file, "\t.sleb128 " HOST_WIDE_INT_PRINT_DEC, value);
@@ -625,18 +616,17 @@ dw2_asm_output_data_sleb128 VPARAMS ((HO
 #endif
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-dw2_asm_output_delta_uleb128 VPARAMS ((const char *lab1 ATTRIBUTE_UNUSED,
-				       const char *lab2 ATTRIBUTE_UNUSED,
-				       const char *comment, ...))
+dw2_asm_output_delta_uleb128 (const char *lab1 ATTRIBUTE_UNUSED,
+			      const char *lab2 ATTRIBUTE_UNUSED,
+			      const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, const char *, lab1);
-  VA_FIXEDARG (ap, const char *, lab2);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+
+  va_start (ap, comment);
 
 #ifdef HAVE_AS_LEB128
   fputs ("\t.uleb128 ", asm_out_file);
@@ -654,18 +644,17 @@ dw2_asm_output_delta_uleb128 VPARAMS ((c
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-dw2_asm_output_delta_sleb128 VPARAMS ((const char *lab1 ATTRIBUTE_UNUSED,
-				       const char *lab2 ATTRIBUTE_UNUSED,
-				       const char *comment, ...))
+dw2_asm_output_delta_sleb128 (const char *lab1 ATTRIBUTE_UNUSED,
+			      const char *lab2 ATTRIBUTE_UNUSED,
+			      const char *comment, ...)
 {
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, const char *, lab1);
-  VA_FIXEDARG (ap, const char *, lab2);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
 #ifdef HAVE_AS_LEB128
   fputs ("\t.sleb128 ", asm_out_file);
@@ -683,7 +672,7 @@ dw2_asm_output_delta_sleb128 VPARAMS ((c
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 static rtx dw2_force_const_mem PARAMS ((rtx));
@@ -795,16 +784,13 @@ dw2_output_indirect_constants ()
 /* Like dw2_asm_output_addr_rtx, but encode the pointer as directed.  */
 
 void
-dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding,
-					  rtx addr,
-					  const char *comment, ...))
+dw2_asm_output_encoded_addr_rtx (int encoding, rtx addr,
+				 const char *comment, ...)
 {
   int size;
-
-  VA_OPEN (ap, comment);
-  VA_FIXEDARG (ap, int, encoding);
-  VA_FIXEDARG (ap, rtx, addr);
-  VA_FIXEDARG (ap, const char *, comment);
+  va_list ap;
+  
+  va_start (ap, comment);
 
   size = size_of_encoded_value (encoding);
 
@@ -878,7 +864,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS 
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 #include "gt-dwarf2asm.h"
diff -rup orig/egcc-CVS20030516/gcc/emit-rtl.c egcc-CVS20030516/gcc/emit-rtl.c
--- orig/egcc-CVS20030516/gcc/emit-rtl.c	2003-05-03 23:16:36.000000000 -0400
+++ egcc-CVS20030516/gcc/emit-rtl.c	2003-05-17 10:18:37.125945924 -0400
@@ -713,15 +713,14 @@ gen_lowpart_SUBREG (mode, reg)
 
 /*VARARGS2*/
 rtx
-gen_rtx VPARAMS ((enum rtx_code code, enum machine_mode mode, ...))
+gen_rtx (enum rtx_code code, enum machine_mode mode, ...)
 {
   int i;		/* Array indices...			*/
   const char *fmt;	/* Current rtx's format...		*/
   rtx rt_val;		/* RTX to return to caller...		*/
+  va_list p;
 
-  VA_OPEN (p, mode);
-  VA_FIXEDARG (p, enum rtx_code, code);
-  VA_FIXEDARG (p, enum machine_mode, mode);
+  va_start (p, mode);
 
   switch (code)
     {
@@ -795,7 +794,7 @@ gen_rtx VPARAMS ((enum rtx_code code, en
       break;
     }
 
-  VA_CLOSE (p);
+  va_end (p);
   return rt_val;
 }
 
@@ -807,13 +806,13 @@ gen_rtx VPARAMS ((enum rtx_code code, en
 
 /*VARARGS1*/
 rtvec
-gen_rtvec VPARAMS ((int n, ...))
+gen_rtvec (int n, ...)
 {
   int i, save_n;
   rtx *vector;
+  va_list p;
 
-  VA_OPEN (p, n);
-  VA_FIXEDARG (p, int, n);
+  va_start (p, n);
 
   if (n == 0)
     return NULL_RTVEC;		/* Don't allocate an empty rtvec...	*/
@@ -825,7 +824,7 @@ gen_rtvec VPARAMS ((int n, ...))
 
   /* The definition of VA_* in K&R C causes `n' to go out of scope.  */
   save_n = n;
-  VA_CLOSE (p);
+  va_end (p);
 
   return gen_rtvec_v (save_n, vector);
 }
diff -rup orig/egcc-CVS20030516/gcc/errors.c egcc-CVS20030516/gcc/errors.c
--- orig/egcc-CVS20030516/gcc/errors.c	2002-12-16 13:19:24.000000000 -0500
+++ egcc-CVS20030516/gcc/errors.c	2003-05-17 10:17:01.174568254 -0400
@@ -39,14 +39,14 @@ int have_error = 0;
 /* Print a warning message - output produced, but there may be problems.  */
 
 void
-warning VPARAMS ((const char *format, ...))
+warning (const char *format, ...)
 {
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, const char *, format);
-
+  va_list ap;
+  
+  va_start (ap, format);
   fprintf (stderr, "%s: warning: ", progname);
   vfprintf (stderr, format, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   fputc('\n', stderr);
 }
 
@@ -54,14 +54,14 @@ warning VPARAMS ((const char *format, ..
 /* Print an error message - we keep going but the output is unusable.  */
 
 void
-error VPARAMS ((const char *format, ...))
+error (const char *format, ...)
 {
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, const char *, format);
-
+  va_list ap;
+  
+  va_start (ap, format);
   fprintf (stderr, "%s: ", progname);
   vfprintf (stderr, format, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   fputc('\n', stderr);
 
   have_error = 1;
@@ -71,14 +71,14 @@ error VPARAMS ((const char *format, ...)
 /* Fatal error - terminate execution immediately.  Does not return.  */
 
 void
-fatal VPARAMS ((const char *format, ...))
+fatal (const char *format, ...)
 {
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, const char *, format);
-
+  va_list ap;
+  
+  va_start (ap, format);
   fprintf (stderr, "%s: ", progname);
   vfprintf (stderr, format, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   fputc('\n', stderr);
   exit (FATAL_EXIT_CODE);
 }
@@ -86,14 +86,14 @@ fatal VPARAMS ((const char *format, ...)
 /* Similar, but say we got an internal error.  */
 
 void
-internal_error VPARAMS ((const char *format, ...))
+internal_error (const char *format, ...)
 {
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, const char *, format);
-
+  va_list ap;
+  
+  va_start (ap, format);
   fprintf (stderr, "%s: Internal error: ", progname);
   vfprintf (stderr, format, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   fputc ('\n', stderr);
   exit (FATAL_EXIT_CODE);
 }
diff -rup orig/egcc-CVS20030516/gcc/final.c egcc-CVS20030516/gcc/final.c
--- orig/egcc-CVS20030516/gcc/final.c	2003-05-13 20:01:30.000000000 -0400
+++ egcc-CVS20030516/gcc/final.c	2003-05-17 10:15:02.475193115 -0400
@@ -2835,13 +2835,14 @@ alter_cond (cond)
    In an `asm', it's the user's fault; otherwise, the compiler's fault.  */
 
 void
-output_operand_lossage VPARAMS ((const char *msgid, ...))
+output_operand_lossage (const char *msgid, ...)
 {
   char *fmt_string;
   char *new_message;
   const char *pfx_str;
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+  
+  va_start (ap, msgid);
 
   pfx_str = this_is_asm_operands ? _("invalid `asm': ") : "output_operand: ";
   asprintf (&fmt_string, "%s%s", pfx_str, _(msgid));
@@ -2854,7 +2855,7 @@ output_operand_lossage VPARAMS ((const c
 
   free (fmt_string);
   free (new_message);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Output of assembler code from a template, and its subroutines.  */
@@ -3376,14 +3377,13 @@ output_addr_const (file, x)
    We handle alternate assembler dialects here, just like output_asm_insn.  */
 
 void
-asm_fprintf VPARAMS ((FILE *file, const char *p, ...))
+asm_fprintf (FILE *file, const char *p, ...)
 {
   char buf[10];
   char *q, c;
-
-  VA_OPEN (argptr, p);
-  VA_FIXEDARG (argptr, FILE *, file);
-  VA_FIXEDARG (argptr, const char *, p);
+  va_list argptr;
+  
+  va_start (argptr, p);
 
   buf[0] = '%';
 
@@ -3531,7 +3531,7 @@ asm_fprintf VPARAMS ((FILE *file, const 
       default:
 	fputc (c, file);
       }
-  VA_CLOSE (argptr);
+  va_end (argptr);
 }
 
 /* Split up a CONST_DOUBLE or integer constant rtx
diff -rup orig/egcc-CVS20030516/gcc/fix-header.c egcc-CVS20030516/gcc/fix-header.c
--- orig/egcc-CVS20030516/gcc/fix-header.c	2003-05-11 20:01:20.000000000 -0400
+++ egcc-CVS20030516/gcc/fix-header.c	2003-05-17 10:12:28.479059548 -0400
@@ -1355,11 +1355,11 @@ v_fatal (str, ap)
 }
 
 static void
-fatal VPARAMS ((const char *str, ...))
+fatal (const char *str, ...)
 {
-  VA_OPEN (ap, str);
-  VA_FIXEDARG (ap, const char *, str);
-
+  va_list ap;
+  
+  va_start (ap, str);
   v_fatal (str, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
diff -rup orig/egcc-CVS20030516/gcc/gcc.c egcc-CVS20030516/gcc/gcc.c
--- orig/egcc-CVS20030516/gcc/gcc.c	2003-05-07 20:01:22.000000000 -0400
+++ egcc-CVS20030516/gcc/gcc.c	2003-05-17 10:12:03.881313031 -0400
@@ -6683,40 +6683,41 @@ fancy_abort ()
 /* Output an error message and exit */
 
 void
-fatal VPARAMS ((const char *msgid, ...))
+fatal (const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+  
+  va_start (ap, msgid);
 
   fprintf (stderr, "%s: ", programname);
   vfprintf (stderr, _(msgid), ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   fprintf (stderr, "\n");
   delete_temp_files ();
   exit (1);
 }
 
 void
-error VPARAMS ((const char *msgid, ...))
+error (const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   fprintf (stderr, "%s: ", programname);
   vfprintf (stderr, _(msgid), ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 
   fprintf (stderr, "\n");
 }
 
 static void
-notice VPARAMS ((const char *msgid, ...))
+notice (const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   vfprintf (stderr, _(msgid), ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 static inline void
diff -rup orig/egcc-CVS20030516/gcc/gcov.c egcc-CVS20030516/gcc/gcov.c
--- orig/egcc-CVS20030516/gcc/gcov.c	2003-05-14 20:01:33.000000000 -0400
+++ egcc-CVS20030516/gcc/gcov.c	2003-05-17 10:10:22.550426885 -0400
@@ -362,14 +362,13 @@ main (argc, argv)
 }
 
 static void
-fnotice VPARAMS ((FILE *file, const char *msgid, ...))
+fnotice (FILE *file, const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, FILE *, file);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   vfprintf (file, _(msgid), ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* More 'friendly' abort that prints the line and file.
diff -rup orig/egcc-CVS20030516/gcc/genattrtab.c egcc-CVS20030516/gcc/genattrtab.c
--- orig/egcc-CVS20030516/gcc/genattrtab.c	2003-02-01 18:46:25.000000000 -0500
+++ egcc-CVS20030516/gcc/genattrtab.c	2003-05-17 10:08:57.268134002 -0400
@@ -719,14 +719,14 @@ attr_rtx_1 (code, p)
 }
 
 static rtx
-attr_rtx VPARAMS ((enum rtx_code code, ...))
+attr_rtx (enum rtx_code code, ...)
 {
   rtx result;
+  va_list p;
   
-  VA_OPEN (p, code);
-  VA_FIXEDARG (p, enum rtx_code, code);
+  va_start (p, code);
   result = attr_rtx_1 (code, p);
-  VA_CLOSE (p);
+  va_end (p);
   return result;
 }
 
@@ -736,19 +736,18 @@ attr_rtx VPARAMS ((enum rtx_code code, .
    rtx attr_printf (len, format, [arg1, ..., argn])  */
 
 char *
-attr_printf VPARAMS ((unsigned int len, const char *fmt, ...))
+attr_printf (unsigned int len, const char *fmt, ...)
 {
   char str[256];
-
-  VA_OPEN (p, fmt);
-  VA_FIXEDARG (p, unsigned int, len);
-  VA_FIXEDARG (p, const char *, fmt);
+  va_list p;
+  
+  va_start (p, fmt);
   
   if (len > sizeof str - 1) /* Leave room for \0.  */
     abort ();
 
   vsprintf (str, fmt, p);
-  VA_CLOSE (p);
+  va_end (p);
 
   return attr_string (str, strlen (str));
 }
diff -rup orig/egcc-CVS20030516/gcc/gengtype.c egcc-CVS20030516/gcc/gengtype.c
--- orig/egcc-CVS20030516/gcc/gengtype.c	2003-04-11 21:01:39.000000000 -0400
+++ egcc-CVS20030516/gcc/gengtype.c	2003-05-17 10:08:01.073184664 -0400
@@ -40,18 +40,18 @@ static void close_output_files PARAMS ((
 /* Report an error at POS, printing MSG.  */
 
 void
-error_at_line VPARAMS ((struct fileloc *pos, const char *msg, ...))
+error_at_line (struct fileloc *pos, const char *msg, ...)
 {
-  VA_OPEN (ap, msg);
-  VA_FIXEDARG (ap, struct fileloc *, pos);
-  VA_FIXEDARG (ap, const char *, msg);
+  va_list ap;
+  
+  va_start (ap, msg);
 
   fprintf (stderr, "%s:%d: ", pos->file, pos->line);
   vfprintf (stderr, msg, ap);
   fputc ('\n', stderr);
   hit_error = 1;
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* vasprintf, but produces fatal message on out-of-memory.  */
@@ -72,13 +72,14 @@ xvasprintf (result, format, args)
 
 /* Wrapper for xvasprintf.  */
 char *
-xasprintf VPARAMS ((const char *format, ...))
+xasprintf (const char *format, ...)
 {
   char *result;
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, const char *, format);
+  va_list ap;
+  
+  va_start (ap, format);
   xvasprintf (&result, format, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   return result;
 }
 
@@ -1088,14 +1089,13 @@ create_file (name, oname)
 
 /* Print, like fprintf, to O.  */
 void 
-oprintf VPARAMS ((outf_p o, const char *format, ...))
+oprintf (outf_p o, const char *format, ...)
 {
   char *s;
   size_t slength;
+  va_list ap;
   
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, outf_p, o);
-  VA_FIXEDARG (ap, const char *, format);
+  va_start (ap, format);
   slength = xvasprintf (&s, format, ap);
 
   if (o->bufused + slength > o->buflength)
@@ -1112,7 +1112,7 @@ oprintf VPARAMS ((outf_p o, const char *
   memcpy (o->buf + o->bufused, s, slength);
   o->bufused += slength;
   free (s);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Open the global header file and the language-specific header files.  */
diff -rup orig/egcc-CVS20030516/gcc/gensupport.c egcc-CVS20030516/gcc/gensupport.c
--- orig/egcc-CVS20030516/gcc/gensupport.c	2002-12-16 13:19:36.000000000 -0500
+++ egcc-CVS20030516/gcc/gensupport.c	2003-05-17 10:06:37.080777828 -0400
@@ -107,17 +107,17 @@ static void process_include PARAMS ((rtx
 static char *save_string PARAMS ((const char *, int));
 
 void
-message_with_line VPARAMS ((int lineno, const char *msg, ...))
+message_with_line (int lineno, const char *msg, ...)
 {
-  VA_OPEN (ap, msg);
-  VA_FIXEDARG (ap, int, lineno);
-  VA_FIXEDARG (ap, const char *, msg);
+  va_list ap;
+  
+  va_start (ap, msg);
 
   fprintf (stderr, "%s:%d: ", read_rtx_filename, lineno);
   vfprintf (stderr, msg, ap);
   fputc ('\n', stderr);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Make a version of gen_rtx_CONST_INT so that GEN_INT can be used in
diff -rup orig/egcc-CVS20030516/gcc/mips-tfile.c egcc-CVS20030516/gcc/mips-tfile.c
--- orig/egcc-CVS20030516/gcc/mips-tfile.c	2003-03-26 21:16:00.000000000 -0500
+++ egcc-CVS20030516/gcc/mips-tfile.c	2003-05-17 10:06:01.983952567 -0400
@@ -5512,12 +5512,12 @@ free_thead (ptr)
 
 /* Output an error message and exit */
 
-/*VARARGS*/
 void
-fatal VPARAMS ((const char *format, ...))
+fatal (const char *format, ...)
 {
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, const char *, format);
+  va_list ap;
+  
+  va_start (ap, format);
 
   if (line_number > 0)
     fprintf (stderr, "%s, %s:%ld ", progname, input_name, line_number);
@@ -5525,7 +5525,7 @@ fatal VPARAMS ((const char *format, ...)
     fprintf (stderr, "%s:", progname);
 
   vfprintf (stderr, format, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
   fprintf (stderr, "\n");
   if (line_number > 0)
     fprintf (stderr, "line:\t%s\n", cur_line_start);
@@ -5534,12 +5534,12 @@ fatal VPARAMS ((const char *format, ...)
   exit (1);
 }
 
-/*VARARGS*/
 void
-error VPARAMS ((const char *format, ...))
+error (const char *format, ...)
 {
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, char *, format);
+  va_list ap;
+  
+  va_start (ap, format);
 
   if (line_number > 0)
     fprintf (stderr, "%s, %s:%ld ", progname, input_name, line_number);
@@ -5552,7 +5552,7 @@ error VPARAMS ((const char *format, ...)
     fprintf (stderr, "line:\t%s\n", cur_line_start);
 
   had_errors++;
-  VA_CLOSE (ap);
+  va_end (ap);
 
   saber_stop ();
 }
diff -rup orig/egcc-CVS20030516/gcc/protoize.c egcc-CVS20030516/gcc/protoize.c
--- orig/egcc-CVS20030516/gcc/protoize.c	2003-01-16 10:37:57.000000000 -0500
+++ egcc-CVS20030516/gcc/protoize.c	2003-05-17 10:04:28.562459685 -0400
@@ -513,13 +513,13 @@ static char * saved_repl_write_ptr;
 
 /* Translate and output an error message.  */
 static void
-notice VPARAMS ((const char *msgid, ...))
+notice (const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   vfprintf (stderr, _(msgid), ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 
diff -rup orig/egcc-CVS20030516/gcc/ra-debug.c egcc-CVS20030516/gcc/ra-debug.c
--- orig/egcc-CVS20030516/gcc/ra-debug.c	2003-05-16 21:37:51.000000000 -0400
+++ egcc-CVS20030516/gcc/ra-debug.c	2003-05-17 10:04:00.295113115 -0400
@@ -48,14 +48,14 @@ static const char *const reg_class_names
    have any bits in common.  */
 
 void
-ra_debug_msg VPARAMS ((unsigned int level, const char *format, ...))
+ra_debug_msg (unsigned int level, const char *format, ...)
 {
-  VA_OPEN (ap, format);
-  VA_FIXEDARG (ap, unsigned int, level);
-  VA_FIXEDARG (ap, const char *, format);
+  va_list ap;
+  
+  va_start (ap, format);
   if ((debug_new_regalloc & level) != 0 && rtl_dump_file != NULL)
     vfprintf (rtl_dump_file, format, ap);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 
diff -rup orig/egcc-CVS20030516/gcc/read-rtl.c egcc-CVS20030516/gcc/read-rtl.c
--- orig/egcc-CVS20030516/gcc/read-rtl.c	2003-01-19 21:25:07.000000000 -0500
+++ egcc-CVS20030516/gcc/read-rtl.c	2003-05-17 10:03:12.619415987 -0400
@@ -51,15 +51,14 @@ int read_rtx_lineno = 1;
 const char *read_rtx_filename = "<unknown>";
 
 static void
-fatal_with_file_and_line VPARAMS ((FILE *infile, const char *msg, ...))
+fatal_with_file_and_line (FILE *infile, const char *msg, ...)
 {
   char context[64];
   size_t i;
   int c;
+  va_list ap;
 
-  VA_OPEN (ap, msg);
-  VA_FIXEDARG (ap, FILE *, infile);
-  VA_FIXEDARG (ap, const char *, msg);
+  va_start (ap, msg);
 
   fprintf (stderr, "%s:%d: ", read_rtx_filename, read_rtx_lineno);
   vfprintf (stderr, msg, ap);
@@ -80,7 +79,7 @@ fatal_with_file_and_line VPARAMS ((FILE 
   fprintf (stderr, "%s:%d: following context is `%s'\n",
 	   read_rtx_filename, read_rtx_lineno, context);
 
-  VA_CLOSE (ap);
+  va_end (ap);
   exit (1);
 }
 
diff -rup orig/egcc-CVS20030516/gcc/rtl-error.c egcc-CVS20030516/gcc/rtl-error.c
--- orig/egcc-CVS20030516/gcc/rtl-error.c	2003-05-01 21:01:24.000000000 -0400
+++ egcc-CVS20030516/gcc/rtl-error.c	2003-05-17 10:02:21.524034235 -0400
@@ -92,25 +92,23 @@ diagnostic_for_asm (insn, msg, args_ptr,
 }
 
 void
-error_for_asm VPARAMS ((rtx insn, const char *msgid, ...))
+error_for_asm (rtx insn, const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, rtx, insn);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   diagnostic_for_asm (insn, msgid, &ap, DK_ERROR);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
-warning_for_asm VPARAMS ((rtx insn, const char *msgid, ...))
+warning_for_asm (rtx insn, const char *msgid, ...)
 {
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, rtx, insn);
-  VA_FIXEDARG (ap, const char *, msgid);
-
+  va_list ap;
+  
+  va_start (ap, msgid);
   diagnostic_for_asm (insn, msgid, &ap, DK_WARNING);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 void
diff -rup orig/egcc-CVS20030516/gcc/tree.c egcc-CVS20030516/gcc/tree.c
--- orig/egcc-CVS20030516/gcc/tree.c	2003-05-13 20:01:34.000000000 -0400
+++ egcc-CVS20030516/gcc/tree.c	2003-05-17 10:01:14.090164629 -0400
@@ -2247,17 +2247,16 @@ stabilize_reference_1 (e)
    Constants, decls, types and misc nodes cannot be.  */
 
 tree
-build VPARAMS ((enum tree_code code, tree tt, ...))
+build (enum tree_code code, tree tt, ...)
 {
   tree t;
   int length;
   int i;
   int fro;
   int constant;
+  va_list p;
 
-  VA_OPEN (p, tt);
-  VA_FIXEDARG (p, enum tree_code, code);
-  VA_FIXEDARG (p, tree, tt);
+  va_start (p, tt);
 
   t = make_node (code);
   length = TREE_CODE_LENGTH (code);
@@ -2334,7 +2333,7 @@ build VPARAMS ((enum tree_code code, tre
 	    }
 	}
     }
-  VA_CLOSE (p);
+  va_end (p);
 
   TREE_CONSTANT (t) = constant;
   return t;
@@ -2435,14 +2434,14 @@ build1 (code, type, node)
    or even garbage if their values do not matter.  */
 
 tree
-build_nt VPARAMS ((enum tree_code code, ...))
+build_nt (enum tree_code code, ...)
 {
   tree t;
   int length;
   int i;
+  va_list p;
 
-  VA_OPEN (p, code);
-  VA_FIXEDARG (p, enum tree_code, code);
+  va_start (p, code);
 
   t = make_node (code);
   length = TREE_CODE_LENGTH (code);
@@ -2450,7 +2449,7 @@ build_nt VPARAMS ((enum tree_code code, 
   for (i = 0; i < length; i++)
     TREE_OPERAND (t, i) = va_arg (p, tree);
 
-  VA_CLOSE (p);
+  va_end (p);
   return t;
 }
 
@@ -3838,12 +3837,12 @@ build_function_type (value_type, arg_typ
    be terminated by NULL_TREE.  */
 
 tree
-build_function_type_list VPARAMS ((tree return_type, ...))
+build_function_type_list (tree return_type, ...)
 {
   tree t, args, last;
+  va_list p;
 
-  VA_OPEN (p, return_type);
-  VA_FIXEDARG (p, tree, return_type);
+  va_start (p, return_type);
 
   t = va_arg (p, tree);
   for (args = NULL_TREE; t != NULL_TREE; t = va_arg (p, tree))
@@ -3854,7 +3853,7 @@ build_function_type_list VPARAMS ((tree 
   TREE_CHAIN (last) = void_list_node;
   args = build_function_type (return_type, args);
 
-  VA_CLOSE (p);
+  va_end (p);
   return args;
 }
 


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