Commit e64c46ce by Andreas Jaeger

parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.

	* parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
	* jv-scan.c: Likewise.

From-SVN: r45671
parent 5dead3e5
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -239,42 +239,26 @@ DEFUN (main, (argc, argv), ...@@ -239,42 +239,26 @@ DEFUN (main, (argc, argv),
void void
fatal_error VPARAMS ((const char *s, ...)) fatal_error VPARAMS ((const char *s, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, s);
const char *s; VA_FIXEDARG (ap, const char *, s);
#endif
va_list ap;
VA_START (ap, s);
#ifndef ANSI_PROTOTYPES
s = va_arg (ap, const char *);
#endif
fprintf (stderr, "%s: error: ", exec_name); fprintf (stderr, "%s: error: ", exec_name);
vfprintf (stderr, s, ap); vfprintf (stderr, s, ap);
fputc ('\n', stderr); fputc ('\n', stderr);
va_end (ap); VA_CLOSE (ap);
exit (1); exit (1);
} }
void void
warning VPARAMS ((const char *s, ...)) warning VPARAMS ((const char *s, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, s);
const char *s; VA_FIXEDARG (ap, const char *, s);
#endif
va_list ap;
VA_START (ap, s);
#ifndef ANSI_PROTOTYPES
s = va_arg (ap, const char *);
#endif
fprintf (stderr, "%s: warning: ", exec_name); fprintf (stderr, "%s: warning: ", exec_name);
vfprintf (stderr, s, ap); vfprintf (stderr, s, ap);
fputc ('\n', stderr); fputc ('\n', stderr);
va_end (ap); VA_CLOSE (ap);
} }
void void
......
...@@ -3085,19 +3085,11 @@ issue_warning_error_from_context (cl, msg, ap) ...@@ -3085,19 +3085,11 @@ issue_warning_error_from_context (cl, msg, ap)
void void
parse_error_context VPARAMS ((tree cl, const char *msg, ...)) parse_error_context VPARAMS ((tree cl, const char *msg, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msg);
tree cl; VA_FIXEDARG (ap, tree, cl);
const char *msg; VA_FIXEDARG (ap, const char *, msg);
#endif
va_list ap;
VA_START (ap, msg);
#ifndef ANSI_PROTOTYPES
cl = va_arg (ap, tree);
msg = va_arg (ap, const char *);
#endif
issue_warning_error_from_context (cl, msg, ap); issue_warning_error_from_context (cl, msg, ap);
va_end (ap); VA_CLOSE (ap);
} }
/* Issue a warning at a current source line CL */ /* Issue a warning at a current source line CL */
...@@ -3105,22 +3097,14 @@ parse_error_context VPARAMS ((tree cl, const char *msg, ...)) ...@@ -3105,22 +3097,14 @@ parse_error_context VPARAMS ((tree cl, const char *msg, ...))
static void static void
parse_warning_context VPARAMS ((tree cl, const char *msg, ...)) parse_warning_context VPARAMS ((tree cl, const char *msg, ...))
{ {
#ifndef ANSI_PROTOTYPES VA_OPEN (ap, msg);
tree cl; VA_FIXEDARG (ap, tree, cl);
const char *msg; VA_FIXEDARG (ap, const char *, msg);
#endif
va_list ap;
VA_START (ap, msg);
#ifndef ANSI_PROTOTYPES
cl = va_arg (ap, tree);
msg = va_arg (ap, const char *);
#endif
force_error = do_warning = 1; force_error = do_warning = 1;
issue_warning_error_from_context (cl, msg, ap); issue_warning_error_from_context (cl, msg, ap);
do_warning = force_error = 0; do_warning = force_error = 0;
va_end (ap); VA_CLOSE (ap);
} }
static tree static tree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment