From 7a75edb707a02506432d73b93b38c8a4f10de79e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 27 Aug 2001 08:48:43 +0200 Subject: emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * emit-rtl.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout. * errors.c: Likewise. * final.c: Likewise. * dwarf2asm.c: Likewise. * doprint.c (checkit): Likewise. * diagnostic.c: Likewise. * collect2.c: Likewise. * calls.c: Likewise. * c-semantics.c (build_stmt): Likewise. * c-format.c (status_warning): Likewise. * c-errors.c (pedwarn_c99): Likewise. * builtins.c (validate_arglist): Likewise. * config/pj/pj.c (pj_printf): Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c (fnotice): Likewise. * gensupport.c (message_with_line): Likewise. * mips-tfile.c: Likewise. * protoize.c (notice): Likewise. * read-rtl.c (fatal_with_file_and_line): Likewise. * rtl-error.c: Likewise. * tradcpp.c: Likewise. * tree.c: Likewise. * cp/tree.c (build_min_nt): Likewise. (build_min): Likewise. * cp/lex.c: Likewise. * cp/errfn.c: Likewise. * cp/rtti.c (create_pseudo_type_info): Likewise. From-SVN: r45185 --- gcc/errors.c | 56 ++++++++++++-------------------------------------------- 1 file changed, 12 insertions(+), 44 deletions(-) (limited to 'gcc/errors.c') diff --git a/gcc/errors.c b/gcc/errors.c index be59323e296..8d072979c35 100644 --- a/gcc/errors.c +++ b/gcc/errors.c @@ -39,20 +39,12 @@ int have_error = 0; void warning VPARAMS ((const char *format, ...)) { -#ifndef ANSI_PROTOTYPES - const char *format; -#endif - va_list ap; - - VA_START (ap, format); - -#ifndef ANSI_PROTOTYPES - format = va_arg (ap, const char *); -#endif + VA_OPEN (ap, format); + VA_FIXEDARG (ap, const char *, format); fprintf (stderr, "%s: warning: ", progname); vfprintf (stderr, format, ap); - va_end (ap); + VA_CLOSE (ap); fputc('\n', stderr); } @@ -62,20 +54,12 @@ warning VPARAMS ((const char *format, ...)) void error VPARAMS ((const char *format, ...)) { -#ifndef ANSI_PROTOTYPES - const char *format; -#endif - va_list ap; - - VA_START (ap, format); - -#ifndef ANSI_PROTOTYPES - format = va_arg (ap, const char *); -#endif + VA_OPEN (ap, format); + VA_FIXEDARG (ap, const char *, format); fprintf (stderr, "%s: ", progname); vfprintf (stderr, format, ap); - va_end (ap); + VA_CLOSE (ap); fputc('\n', stderr); have_error = 1; @@ -87,20 +71,12 @@ error VPARAMS ((const char *format, ...)) void fatal VPARAMS ((const char *format, ...)) { -#ifndef ANSI_PROTOTYPES - const char *format; -#endif - va_list ap; - - VA_START (ap, format); - -#ifndef ANSI_PROTOTYPES - format = va_arg (ap, const char *); -#endif + VA_OPEN (ap, format); + VA_FIXEDARG (ap, const char *, format); fprintf (stderr, "%s: ", progname); vfprintf (stderr, format, ap); - va_end (ap); + VA_CLOSE (ap); fputc('\n', stderr); exit (FATAL_EXIT_CODE); } @@ -110,20 +86,12 @@ fatal VPARAMS ((const char *format, ...)) void internal_error VPARAMS ((const char *format, ...)) { -#ifndef ANSI_PROTOTYPES - const char *format; -#endif - va_list ap; - - VA_START (ap, format); - -#ifndef ANSI_PROTOTYPES - format = va_arg (ap, const char *); -#endif + VA_OPEN (ap, format); + VA_FIXEDARG (ap, const char *, format); fprintf (stderr, "%s: Internal error: ", progname); vfprintf (stderr, format, ap); - va_end (ap); + VA_CLOSE (ap); fputc ('\n', stderr); exit (FATAL_EXIT_CODE); } -- cgit v1.2.1