]> gcc.gnu.org Git - gcc.git/commitdiff
builtins.c (validate_arglist): Eliminate libiberty VA_ macros, always use stdarg.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 17 May 2003 22:21:35 +0000 (22:21 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 17 May 2003 22:21:35 +0000 (22:21 +0000)
gcc:
* 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.

From-SVN: r66919

29 files changed:
gcc/ChangeLog
gcc/builtins.c
gcc/c-errors.c
gcc/c-format.c
gcc/c-semantics.c
gcc/calls.c
gcc/collect2.c
gcc/cp/ChangeLog
gcc/cp/error.c
gcc/cp/rtti.c
gcc/cp/tree.c
gcc/cpperror.c
gcc/diagnostic.c
gcc/dwarf2asm.c
gcc/emit-rtl.c
gcc/errors.c
gcc/final.c
gcc/fix-header.c
gcc/gcc.c
gcc/gcov.c
gcc/genattrtab.c
gcc/gengtype.c
gcc/gensupport.c
gcc/mips-tfile.c
gcc/protoize.c
gcc/ra-debug.c
gcc/read-rtl.c
gcc/rtl-error.c
gcc/tree.c

index 504a57b9070c80cac86c68c87a83a8467fc0336b..bd643b501ab0cda7d612dcbeb3748b280180b829 100644 (file)
@@ -1,3 +1,39 @@
+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.
+
 2003-05-17  Neil Booth  <neil@daikokuya.co.uk>
 
        * defaults.h (TARGET_CPU_CPP_BUILTINS, CPP_PREDEFINES): Remove.
index 6745300fe803825d635fddaa4233b66880e8e69b..c3965e927ecddc9406033edbbdfd0fb05a949ac2 100644 (file)
@@ -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;
 }
index 3f3f69039de27264676622558348e15739c3f99e..de24a04afc6fe01cb77d2b5d60faf95169edb6f5 100644 (file)
@@ -32,14 +32,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 /* 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);
 }
index bf50c8636223798bd39c523a7591e44c5b737662..fd9b200398a9429a333c630d51d3afcf8e75b064 100644 (file)
@@ -996,13 +996,12 @@ check_function_format (status, attrs, params)
    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, const char *msgid, ...))
       report_diagnostic (&diagnostic);
     }
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Variables used by the checking of $ operand number formats.  */
index 91ab8738033b1d5f8ed7c12eecfc67ea8a9fdb01..a5cf7754a60d79e4592e74aebcfa9295cade9161 100644 (file)
@@ -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;
 }
 
index 70883ee38354cb0b657d36d9a9cec736f0bb6205..5b4fbc9b94f1e410bd51c84c1008a325bfb3a2d0 100644 (file)
@@ -4171,18 +4171,14 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
    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);
 }
 \f
 /* Like emit_library_call except that an extra argument, VALUE,
@@ -4194,23 +4190,17 @@ emit_library_call VPARAMS((rtx orgfun, enum libcall_type fn_type,
    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;
 }
index ca1fe92b1e23a70588802b275ec35ee5348e3732..71229be5cc9ab8c326564cd08e9c25ae4dc7457e 100644 (file)
@@ -360,29 +360,28 @@ collect_exit (status)
 \f
 /* 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 * msgid, ...))
 /* 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,
index 217d447745745961958d06a8f1a5e928e6f14390..b269645f4b4bfc4758bd104da8ded70f657374bd 100644 (file)
@@ -1,3 +1,10 @@
+2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * 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.
+
 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * ptree.c (cxx_print_type, cxx_print_xnode): Use string
index 7672fcd631aa6081fb7b4040c68313339bccf5f0..21a87d851d345400a9cbbc5fe7419b7021a801ee 100644 (file)
@@ -2607,62 +2607,56 @@ locate_error (const char *msgid, va_list ap)
 
 
 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);
 }
index 7b230e974f4bc84724d9d3b6ae3885c491a92697..930036351b5ec198e449d6863a4ce23d35a5397b 100644 (file)
@@ -1124,10 +1124,9 @@ create_pseudo_type_info (const char *real_name, int ident, ...)
   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 *real_name, int ident, ...)
   TINFO_PSEUDO_TYPE (result) =
     cp_build_qualified_type (pseudo_type, TYPE_QUAL_CONST);
   
-  VA_CLOSE (ap);
+  va_end (ap);
   return result;
 }
 
index c333612e6fee5cd699358123023e448c50f63fba..5ce3500915a3fa60394d092ce2b1ed480c6a7a2e 100644 (file)
@@ -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 code, ...))
       TREE_OPERAND (t, i) = x;
     }
 
-  VA_CLOSE (p);
+  va_end (p);
   return t;
 }
 
@@ -1527,15 +1527,14 @@ build_min_nt VPARAMS ((enum tree_code code, ...))
    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 tt, ...))
       TREE_OPERAND (t, i) = x;
     }
 
-  VA_CLOSE (p);
+  va_end (p);
   return t;
 }
 
index 20d8c8cb26e8532456f7f00e517097be29de4593..9f5a5397f44ccea6f1daf8f11c31652e946a7fab 100644 (file)
@@ -128,14 +128,12 @@ _cpp_begin_message (pfile, code, line, column)
 
 /* 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, int level, const char *msgid, ...))
   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
index 53399fcf4a8db67eb48ccb6d836d5a0bdfcc75a7..6d254337ce740908653261423ed2ae253cbe2918 100644 (file)
@@ -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);
 }
 
 \f
@@ -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 *msgid, ...))
    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, const char *msgid, ...))
                        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, const char *msgid, ...))
                        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);
 }
 \f
 /* Special case error functions.  Most are implemented in terms of the
@@ -1390,14 +1379,13 @@ error_with_decl VPARAMS ((tree decl, const char *msgid, ...))
 /* 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.  */
index 00a7b41b05a4c2d318d171d337fb53e59d55c6e1..c2ca9166f460ca699359d31044fda5ab49b8ec7b 100644 (file)
@@ -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, unsigned HOST_WIDE_INT value,
     }
   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, unsigned HOST_WIDE_INT value,
    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, const char *lab1, const char *lab2,
     }
   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, const char *lab1, const char *lab2,
    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, const char *label,
     }
   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, ...))
+dw2_asm_output_pcrel (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);
+  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 ATTRIBUTE_UNUSED,
     }
   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, const char *label,
     }
   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 size, rtx addr,
     }
   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 char *str, size_t orig_len,
        assemble_integer (const0_rtx, 1, BITS_PER_UNIT, 1);
     }
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 \f
 
@@ -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 ((unsigned HOST_WIDE_INT value,
 #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 ((HOST_WIDE_INT value,
 #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 ((const char *lab1 ATTRIBUTE_UNUSED,
     }
   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 ((const char *lab1 ATTRIBUTE_UNUSED,
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 \f
 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 ((int encoding,
     }
   fputc ('\n', asm_out_file);
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 #include "gt-dwarf2asm.h"
index a000551dc2ee16aa53325cb5056c9444ab66b132..1df50a75fec983725ea7284400f6d073985aadc0 100644 (file)
@@ -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, enum machine_mode mode, ...))
       break;
     }
 
-  VA_CLOSE (p);
+  va_end (p);
   return rt_val;
 }
 
@@ -807,13 +806,13 @@ gen_rtx VPARAMS ((enum rtx_code code, enum machine_mode mode, ...))
 
 /*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);
 }
index 02c272fc54d26e734aab191b68310e72812bb5df..4147b3fcf0ab300015433bf91a64e71771fd556e 100644 (file)
@@ -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);
 }
index 0907411efbe2491b8f9799f59ebb1c82a604224f..1dc66c5400f5922943c25cda78d906f774ac4084 100644 (file)
@@ -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 char *msgid, ...))
 
   free (fmt_string);
   free (new_message);
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 \f
 /* 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 char *p, ...))
       default:
        fputc (c, file);
       }
-  VA_CLOSE (argptr);
+  va_end (argptr);
 }
 \f
 /* Split up a CONST_DOUBLE or integer constant rtx
index c34d3c3e3be3a2800df57a023a5710a4d90774c4..6ec7851dc720626b59da5293fefb5651c809a8fa 100644 (file)
@@ -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);
 }
index 093742866da32212bf7662c26555d4b7788cd6ba..a44ca213d6e2bf5bad9743e8111679697e0d8cc2 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -6514,40 +6514,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);
 }
 \f
 static inline void
index 32590cba2fa8cd280f11c286ff5b3296998c07cd..3a7de61d3f4bbfcf2a05a6d78d2292b82819f8f5 100644 (file)
@@ -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.
index 0270945abff034e86a1fe737825f7920b821e920..f757a4d96fe6839eaec6e75e589b539ba0d46f2a 100644 (file)
@@ -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));
 }
index 4a3c29853eb7e0354ee35b6999cdfc35f32778f3..1ad3e05d3504eca83af57cf90ecaf6b37ba739b6 100644 (file)
@@ -40,18 +40,18 @@ static void close_output_files PARAMS ((void));
 /* 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 *format, ...))
   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.  */
index bc07c90317cc632a228eb77ef11869469591a12d..9c46ded7922068cbc5770ac592c01038becc6194 100644 (file)
@@ -107,17 +107,17 @@ static void process_include PARAMS ((rtx, int));
 static char *save_string PARAMS ((const char *, int));
 \f
 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
index b29a7da223480f73e22be5188358e797fdc6ec43..45b8717d933b2d7b4af2eef124129d78d4425c75 100644 (file)
@@ -5512,12 +5512,12 @@ free_thead (ptr)
 \f
 /* 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 ();
 }
index dfaa38051e16db31d5e4c88397bdee16db2b012f..a83add6db7217538ab2e43bb7cd415ebfa7207ae 100644 (file)
@@ -513,13 +513,13 @@ static char * saved_repl_write_ptr;
 \f
 /* 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);
 }
 
 \f
index b84bf619755c51d1f417d266bf4387c2199a575b..17d89b469eeb2e94fde9423f06a0719e64d649cd 100644 (file)
@@ -48,14 +48,14 @@ static const char *const reg_class_names[] = 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);
 }
 
 
index 95bc2fefa57fc6757b37709098b8ac7cf4115386..5b4a6c44b18d6dfc745e3dfa1def98caa0a09d6a 100644 (file)
@@ -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 *infile, const char *msg, ...))
   fprintf (stderr, "%s:%d: following context is `%s'\n",
           read_rtx_filename, read_rtx_lineno, context);
 
-  VA_CLOSE (ap);
+  va_end (ap);
   exit (1);
 }
 
index 7526125f9a57425af49c65b597e3688980c79559..d5efc762d873ed01a35fa4976aa881630ed7b400 100644 (file)
@@ -92,25 +92,23 @@ diagnostic_for_asm (insn, msg, args_ptr, kind)
 }
 
 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
index 5ae362cc9d5e3a5fa15d12b4dfb4e82cd784d8c6..7c04b3d01fd4336a4791c083fa7e7cd6ed72014e 100644 (file)
@@ -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, tree tt, ...))
            }
        }
     }
-  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;
 }
 \f
@@ -3838,12 +3837,12 @@ build_function_type (value_type, arg_types)
    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 return_type, ...))
   TREE_CHAIN (last) = void_list_node;
   args = build_function_type (return_type, args);
 
-  VA_CLOSE (p);
+  va_end (p);
   return args;
 }
 
This page took 0.138382 seconds and 5 git commands to generate.