mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 07:14:38 +08:00
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
This commit is contained in:
parent
5dead3e5cd
commit
e64c46ce50
2769
gcc/java/ChangeLog
2769
gcc/java/ChangeLog
File diff suppressed because it is too large
Load Diff
@ -239,42 +239,26 @@ DEFUN (main, (argc, argv),
|
||||
void
|
||||
fatal_error VPARAMS ((const char *s, ...))
|
||||
{
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
const char *s;
|
||||
#endif
|
||||
va_list ap;
|
||||
|
||||
VA_START (ap, s);
|
||||
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
s = va_arg (ap, const char *);
|
||||
#endif
|
||||
VA_OPEN (ap, s);
|
||||
VA_FIXEDARG (ap, const char *, s);
|
||||
|
||||
fprintf (stderr, "%s: error: ", exec_name);
|
||||
vfprintf (stderr, s, ap);
|
||||
fputc ('\n', stderr);
|
||||
va_end (ap);
|
||||
VA_CLOSE (ap);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
void
|
||||
warning VPARAMS ((const char *s, ...))
|
||||
{
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
const char *s;
|
||||
#endif
|
||||
va_list ap;
|
||||
|
||||
VA_START (ap, s);
|
||||
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
s = va_arg (ap, const char *);
|
||||
#endif
|
||||
VA_OPEN (ap, s);
|
||||
VA_FIXEDARG (ap, const char *, s);
|
||||
|
||||
fprintf (stderr, "%s: warning: ", exec_name);
|
||||
vfprintf (stderr, s, ap);
|
||||
fputc ('\n', stderr);
|
||||
va_end (ap);
|
||||
VA_CLOSE (ap);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -3085,19 +3085,11 @@ issue_warning_error_from_context (cl, msg, ap)
|
||||
void
|
||||
parse_error_context VPARAMS ((tree cl, const char *msg, ...))
|
||||
{
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
tree cl;
|
||||
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
|
||||
VA_OPEN (ap, msg);
|
||||
VA_FIXEDARG (ap, tree, cl);
|
||||
VA_FIXEDARG (ap, const char *, msg);
|
||||
issue_warning_error_from_context (cl, msg, ap);
|
||||
va_end (ap);
|
||||
VA_CLOSE (ap);
|
||||
}
|
||||
|
||||
/* Issue a warning at a current source line CL */
|
||||
@ -3105,22 +3097,14 @@ parse_error_context VPARAMS ((tree cl, const char *msg, ...))
|
||||
static void
|
||||
parse_warning_context VPARAMS ((tree cl, const char *msg, ...))
|
||||
{
|
||||
#ifndef ANSI_PROTOTYPES
|
||||
tree cl;
|
||||
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
|
||||
VA_OPEN (ap, msg);
|
||||
VA_FIXEDARG (ap, tree, cl);
|
||||
VA_FIXEDARG (ap, const char *, msg);
|
||||
|
||||
force_error = do_warning = 1;
|
||||
issue_warning_error_from_context (cl, msg, ap);
|
||||
do_warning = force_error = 0;
|
||||
va_end (ap);
|
||||
VA_CLOSE (ap);
|
||||
}
|
||||
|
||||
static tree
|
||||
|
Loading…
Reference in New Issue
Block a user