summaryrefslogtreecommitdiff
path: root/gcc/cp/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/error.c')
-rw-r--r--gcc/cp/error.c42
1 files changed, 18 insertions, 24 deletions
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index 7672fcd631a..21a87d851d3 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2607,62 +2607,56 @@ locate_error (const char *msgid, va_list ap)
void
-cp_error_at VPARAMS ((const char *msgid, ...))
+cp_error_at (const char *msgid, ...)
{
tree here;
diagnostic_info diagnostic;
+ va_list ap;
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_start (ap, msgid);
here = locate_error (msgid, ap);
- VA_CLOSE (ap);
-
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_end (ap);
+ va_start (ap, msgid);
diagnostic_set_info (&diagnostic, msgid, &ap,
cp_file_of (here), cp_line_of (here), DK_ERROR);
report_diagnostic (&diagnostic);
- VA_CLOSE (ap);
+ va_end (ap);
}
void
-cp_warning_at VPARAMS ((const char *msgid, ...))
+cp_warning_at (const char *msgid, ...)
{
tree here;
diagnostic_info diagnostic;
+ va_list ap;
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_start (ap, msgid);
here = locate_error (msgid, ap);
- VA_CLOSE (ap);
-
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_end (ap);
+ va_start (ap, msgid);
diagnostic_set_info (&diagnostic, msgid, &ap,
cp_file_of (here), cp_line_of (here), DK_WARNING);
report_diagnostic (&diagnostic);
- VA_CLOSE (ap);
+ va_end (ap);
}
void
-cp_pedwarn_at VPARAMS ((const char *msgid, ...))
+cp_pedwarn_at (const char *msgid, ...)
{
tree here;
diagnostic_info diagnostic;
+ va_list ap;
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_start (ap, msgid);
here = locate_error (msgid, ap);
- VA_CLOSE (ap);
-
- VA_OPEN (ap, msgid);
- VA_FIXEDARG (ap, const char *, msgid);
+ va_end (ap);
+ va_start (ap, msgid);
diagnostic_set_info (&diagnostic, msgid, &ap,
cp_file_of (here), cp_line_of (here),
pedantic_error_kind());
report_diagnostic (&diagnostic);
- VA_CLOSE (ap);
+ va_end (ap);
}