aboutsummaryrefslogtreecommitdiff
path: root/gcc/tradcpp.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-08-27 08:48:43 +0200
committerAndreas Jaeger <aj@gcc.gnu.org>2001-08-27 08:48:43 +0200
commit7a75edb707a02506432d73b93b38c8a4f10de79e (patch)
tree58234e1acd4f13f4f073a6ad3b59cad11faacb33 /gcc/tradcpp.c
parent6baff4c1e804d360bf220142a24212f2e5759ad1 (diff)
downloadgcc-7a75edb707a02506432d73b93b38c8a4f10de79e.zip
gcc-7a75edb707a02506432d73b93b38c8a4f10de79e.tar.gz
gcc-7a75edb707a02506432d73b93b38c8a4f10de79e.tar.bz2
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
Diffstat (limited to 'gcc/tradcpp.c')
-rw-r--r--gcc/tradcpp.c55
1 files changed, 13 insertions, 42 deletions
diff --git a/gcc/tradcpp.c b/gcc/tradcpp.c
index 7d5e110..6984886 100644
--- a/gcc/tradcpp.c
+++ b/gcc/tradcpp.c
@@ -4686,37 +4686,22 @@ v_message (mtype, line, msgid, ap)
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);
v_message (ERROR, 0, msgid, ap);
+ VA_CLOSE (ap);
}
void
error_with_line VPARAMS ((int line, const char *msgid, ...))
{
-#ifndef ANSI_PROTOTYPES
- int line;
- const char *msgid;
-#endif
- va_list ap;
-
- VA_START(ap, msgid);
-
-#ifndef ANSI_PROTOTYPES
- line = va_arg (ap, int);
- msgid = va_arg (ap, const char *);
-#endif
+ VA_OPEN(ap, msgid);
+ VA_FIXEDARG (ap, int, line);
+ VA_FIXEDARG (ap, const char *, msgid);
v_message (ERROR, line, msgid, ap);
+ VA_CLOSE (ap);
}
/* Error including a message from `errno'. */
@@ -4731,35 +4716,21 @@ error_from_errno (name)
void
warning 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);
v_message (WARNING, 0, msgid, ap);
+ VA_CLOSE (ap);
}
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);
v_message (FATAL, 0, msgid, ap);
+ VA_CLOSE (ap);
exit (FATAL_EXIT_CODE);
}