From 0903457a8fbc337677e7fa52c4f44934263f4447 Mon Sep 17 00:00:00 2001 From: aj Date: Mon, 27 Aug 2001 06:48:43 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45185 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/collect2.c | 55 ++++++++++++------------------------------------------- 1 file changed, 12 insertions(+), 43 deletions(-) (limited to 'gcc/collect2.c') diff --git a/gcc/collect2.c b/gcc/collect2.c index d36b3e0bbff..3405f6ed107 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -363,19 +363,11 @@ collect_exit (status) void notice VPARAMS ((const char *msgid, ...)) { -#ifndef ANSI_PROTOTYPES - const char *msgid; -#endif - va_list ap; - - VA_START (ap, msgid); - -#ifndef ANSI_PROTOTYPES - msgid = va_arg (ap, const char *); -#endif + VA_OPEN (ap, msgid); + VA_FIXEDARG (ap, const char *, msgid); vfprintf (stderr, _(msgid), ap); - va_end (ap); + VA_CLOSE (ap); } /* Die when sys call fails. */ @@ -383,22 +375,15 @@ notice VPARAMS ((const char *msgid, ...)) void fatal_perror VPARAMS ((const char * msgid, ...)) { -#ifndef ANSI_PROTOTYPES - const char *msgid; -#endif int e = errno; - va_list ap; - - VA_START (ap, msgid); -#ifndef ANSI_PROTOTYPES - msgid = va_arg (ap, const char *); -#endif + VA_OPEN (ap, msgid); + VA_FIXEDARG (ap, const char *, msgid); fprintf (stderr, "collect2: "); vfprintf (stderr, _(msgid), ap); fprintf (stderr, ": %s\n", xstrerror (e)); - va_end (ap); + VA_CLOSE (ap); collect_exit (FATAL_EXIT_CODE); } @@ -408,21 +393,13 @@ fatal_perror VPARAMS ((const char * msgid, ...)) void fatal VPARAMS ((const char * msgid, ...)) { -#ifndef ANSI_PROTOTYPES - const char *msgid; -#endif - va_list ap; - - VA_START (ap, msgid); - -#ifndef ANSI_PROTOTYPES - msgid = va_arg (ap, const char *); -#endif + VA_OPEN (ap, msgid); + VA_FIXEDARG (ap, const char *, msgid); fprintf (stderr, "collect2: "); vfprintf (stderr, _(msgid), ap); fprintf (stderr, "\n"); - va_end (ap); + VA_CLOSE (ap); collect_exit (FATAL_EXIT_CODE); } @@ -432,21 +409,13 @@ fatal VPARAMS ((const char * msgid, ...)) void error VPARAMS ((const char * msgid, ...)) { -#ifndef ANSI_PROTOTYPES - const char * msgid; -#endif - va_list ap; - - VA_START (ap, msgid); - -#ifndef ANSI_PROTOTYPES - msgid = va_arg (ap, const char *); -#endif + VA_OPEN (ap, msgid); + VA_FIXEDARG (ap, const char *, msgid); fprintf (stderr, "collect2: "); vfprintf (stderr, _(msgid), ap); fprintf (stderr, "\n"); - va_end(ap); + VA_CLOSE(ap); } /* In case obstack is linked in, and abort is defined to fancy_abort, -- cgit v1.2.1