emit_library_call VPARAMS((rtx orgfun, enum libcall_type fn_type,
enum machine_mode outmode, int nargs, ...))
{
-#ifndef ANSI_PROTOTYPES
- rtx orgfun;
- int fn_type;
- enum machine_mode outmode;
- int nargs;
-#endif
- va_list p;
-
- VA_START (p, nargs);
-
-#ifndef ANSI_PROTOTYPES
- orgfun = va_arg (p, rtx);
- fn_type = va_arg (p, int);
- outmode = va_arg (p, enum machine_mode);
- nargs = va_arg (p, int);
-#endif
+ 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);
emit_library_call_value_1 (0, orgfun, NULL_RTX, fn_type, outmode, nargs, p);
- va_end (p);
+ VA_CLOSE (p);
}
\f
/* Like emit_library_call except that an extra argument, VALUE,
enum libcall_type fn_type,
enum machine_mode outmode, int nargs, ...))
{
-#ifndef ANSI_PROTOTYPES
- rtx orgfun;
- rtx value;
- int fn_type;
- enum machine_mode outmode;
- int nargs;
-#endif
- va_list p;
-
- VA_START (p, nargs);
-
-#ifndef ANSI_PROTOTYPES
- orgfun = va_arg (p, rtx);
- value = va_arg (p, rtx);
- fn_type = va_arg (p, int);
- outmode = va_arg (p, enum machine_mode);
- nargs = va_arg (p, int);
-#endif
+ 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);
value = emit_library_call_value_1 (1, orgfun, value, fn_type, outmode, nargs, p);
- va_end (p);
+ VA_CLOSE (p);
return value;
}
static char *
build_message_string VPARAMS ((const char *msg, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msg;
-#endif
- va_list ap;
char *str;
- VA_START (ap, msg);
-
-#ifndef ANSI_PROTOTYPES
- msg = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msg);
+ VA_FIXEDARG (ap, const char *, msg);
str = vbuild_message_string (msg, ap);
- va_end (ap);
+ VA_CLOSE (ap);
return str;
}
void
output_printf VPARAMS ((struct output_buffer *buffer, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- struct output_buffer *buffer;
- const char *msgid;
-#endif
- va_list ap;
va_list *old_args;
- VA_START (ap, msgid);
-#ifndef ANSI_PROTOTYPES
- buffer = va_arg (ap, output_buffer *);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, output_buffer *, buffer);
+ VA_FIXEDARG (ap, const char *, msgid);
+
old_args = output_buffer_ptr_to_format_args (buffer);
output_buffer_ptr_to_format_args (buffer) = ≈
output_do_printf (buffer, _(msgid));
output_buffer_ptr_to_format_args (buffer) = old_args;
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Print a message relevant to the given DECL. */
void
fnotice VPARAMS ((FILE *file, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- FILE *file;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- file = va_arg (ap, FILE *);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, FILE *, file);
+ VA_FIXEDARG (ap, const char *, msgid);
vfprintf (file, _(msgid), ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
fatal_io_error VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
output_state os;
- os = output_buffer_state (diagnostic_buffer);
- VA_START (ap, msgid);
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ os = output_buffer_state (diagnostic_buffer);
output_printf (diagnostic_buffer, "%s: %s: ", progname, xstrerror (errno));
output_buffer_ptr_to_format_args (diagnostic_buffer) = ≈
output_format (diagnostic_buffer);
diagnostic_finish ((output_buffer *)global_dc);
output_buffer_state (diagnostic_buffer) = os;
- va_end (ap);
+ VA_CLOSE (ap);
exit (FATAL_EXIT_CODE);
}
void
pedwarn VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context
(&dc, msgid, &ap, input_filename, lineno, !flag_pedantic_errors);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Issue a pedantic waring about DECL. */
void
pedwarn_with_decl VPARAMS ((tree decl, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- tree decl;
- const char *msgid;
-#endif
- va_list ap;
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, tree, decl);
+ VA_FIXEDARG (ap, const char *, msgid);
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- decl = va_arg (ap, tree);
- msgid = va_arg (ap, const char *);
-#endif
/* We don't want -pedantic-errors to cause the compilation to fail from
"errors" in system header files. Sometimes fixincludes can't fix what's
broken (eg: unsigned char bitfields - fixing it may change the alignment
warning either, it's just unnecessary noise. */
if (!DECL_IN_SYSTEM_HEADER (decl))
diagnostic_for_decl (decl, msgid, &ap, !flag_pedantic_errors);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Same as above but within the context FILE and LINE. */
pedwarn_with_file_and_line VPARAMS ((const char *file, int line,
const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *file;
- int line;
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- file = va_arg (ap, const char *);
- line = va_arg (ap, int);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, file);
+ VA_FIXEDARG (ap, int, line);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context (&dc, msgid, &ap, file, line, !flag_pedantic_errors);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Just apologize with MSGID. */
void
sorry VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
output_state os;
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
+
os = output_buffer_state (diagnostic_buffer);
- VA_START (ap, msgid);
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
++sorrycount;
output_set_prefix
(diagnostic_buffer, context_as_prefix (input_filename, lineno, 0));
output_format (diagnostic_buffer);
diagnostic_finish ((output_buffer *)global_dc);
output_buffer_state (diagnostic_buffer) = os;
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Called when the start of a function definition is parsed,
error_with_file_and_line VPARAMS ((const char *file, int line,
const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *file;
- int line;
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- file = va_arg (ap, const char *);
- line = va_arg (ap, int);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, file);
+ VA_FIXEDARG (ap, int, line);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context (&dc, msgid, &ap, file, line, /* warn = */ 0);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
error_with_decl VPARAMS ((tree decl, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- tree decl;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- decl = va_arg (ap, tree);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, tree, decl);
+ VA_FIXEDARG (ap, const char *, msgid);
diagnostic_for_decl (decl, msgid, &ap, /* warn = */ 0);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
error VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context
(&dc, msgid, &ap, input_filename, lineno, /* warn = */ 0);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Likewise, except that the compilation is terminated after printing the
void
fatal_error VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context
(&dc, msgid, &ap, input_filename, lineno, /* warn = */ 0);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
fnotice (stderr, "compilation terminated.\n");
exit (FATAL_EXIT_CODE);
void
internal_error VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
if (diagnostic_lock)
error_recursion ();
set_diagnostic_context
(&dc, msgid, &ap, input_filename, lineno, /* warn = */0);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
fnotice (stderr,
"Please submit a full bug report,\n\
warning_with_file_and_line VPARAMS ((const char *file, int line,
const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *file;
- int line;
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- file = va_arg (ap, const char *);
- line = va_arg (ap, int);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, file);
+ VA_FIXEDARG (ap, int, line);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context (&dc, msgid, &ap, file, line, /* warn = */ 1);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
warning_with_decl VPARAMS ((tree decl, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- tree decl;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- decl = va_arg (ap, tree);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, tree, decl);
+ VA_FIXEDARG (ap, const char *, msgid);
diagnostic_for_decl (decl, msgid, &ap, /* warn = */ 1);
- va_end (ap);
+ VA_CLOSE (ap);
}
void
warning VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
diagnostic_context dc;
- VA_START (ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
set_diagnostic_context
(&dc, msgid, &ap, input_filename, lineno, /* warn = */ 1);
report_diagnostic (&dc);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Flush diagnostic_buffer content on stderr. */
void
output_verbatim VPARAMS ((output_buffer *buffer, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- output_buffer *buffer;
- const char *msgid;
-#endif
- va_list ap;
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, output_buffer *, buffer);
+ VA_FIXEDARG (ap, const char *, msgid);
- VA_START (ap, msgid);
-#ifndef ANSI_PROTOTYPES
- buffer = va_arg (ap, output_buffer *);
- msg = va_arg (ap, const char *);
-#endif
output_do_verbatim (buffer, msgid, &ap);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Same as above but use diagnostic_buffer. */
void
verbatim VPARAMS ((const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- const char *msgid;
-#endif
- va_list ap;
+ VA_OPEN (ap, msgid);
+ VA_FIXEDARG (ap, const char *, msgid);
- VA_START (ap, msgid);
-#ifndef ANSI_PROTOTYPES
- msgid = va_arg (ap, const char *);
-#endif
output_do_verbatim (diagnostic_buffer, msgid, &ap);
output_buffer_to_stream (diagnostic_buffer);
- va_end (ap);
+ VA_CLOSE (ap);
}
/* Report a diagnostic message (an error or a warning) as specified by