summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-04 01:16:32 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-04 01:16:32 +0000
commitd65b3a4091670f1e49fadb3f1a0a336dd96ae7d7 (patch)
tree771a18a7e0143049cc335c7595e497a28f9625ec
parentcc9012f7c74cf3452cdb1b6cde3cf6455e889cd3 (diff)
downloadgcc-d65b3a4091670f1e49fadb3f1a0a336dd96ae7d7.tar.gz
gcc/cp:
* cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list* parameter. libcpp: * include/cpplib.h (struct cpp_callbacks): Make error take va_list* parameter. * errors.c (cpp_error): Update call to callback. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106466 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/error.c4
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/errors.c2
-rw-r--r--libcpp/include/cpplib.h2
6 files changed, 16 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5d281d31361..a270fba8e8a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
+
+ * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
+ parameter.
+
2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
PR c++/17964
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index e1ca9f3bea7..978a95f85af 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4438,7 +4438,7 @@ extern void cp_genericize (tree);
#define ATTRIBUTE_GCC_CXXDIAG(m, n) ATTRIBUTE_NONNULL(m)
#endif
extern void cp_cpp_error (cpp_reader *, int,
- const char *, va_list)
+ const char *, va_list *)
ATTRIBUTE_GCC_CXXDIAG(3,0);
#endif /* ! GCC_CP_TREE_H */
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index d5144b446f7..22c2d304d88 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2334,7 +2334,7 @@ cp_printer (pretty_printer *pp, text_info *text, const char *spec,
void
cp_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level,
- const char *msg, va_list ap)
+ const char *msg, va_list *ap)
{
diagnostic_info diagnostic;
diagnostic_t dlevel;
@@ -2356,7 +2356,7 @@ cp_cpp_error (cpp_reader *pfile ATTRIBUTE_UNUSED, int level,
default:
gcc_unreachable ();
}
- diagnostic_set_info_translated (&diagnostic, msg, &ap,
+ diagnostic_set_info_translated (&diagnostic, msg, ap,
input_location, dlevel);
report_diagnostic (&diagnostic);
}
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 3a489b4c1c0..422203c64a1 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
+
+ * include/cpplib.h (struct cpp_callbacks): Make error take
+ va_list* parameter.
+ * errors.c (cpp_error): Update call to callback.
+
2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
PR preprocessor/22042
diff --git a/libcpp/errors.c b/libcpp/errors.c
index 554d9e3c5f1..97de4900001 100644
--- a/libcpp/errors.c
+++ b/libcpp/errors.c
@@ -141,7 +141,7 @@ cpp_error (cpp_reader * pfile, int level, const char *msgid, ...)
va_start (ap, msgid);
if (CPP_OPTION (pfile, client_diagnostic))
- pfile->cb.error (pfile, level, _(msgid), ap);
+ pfile->cb.error (pfile, level, _(msgid), &ap);
else
{
if (CPP_OPTION (pfile, traditional))
diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h
index c5d8e85391a..adae96b3560 100644
--- a/libcpp/include/cpplib.h
+++ b/libcpp/include/cpplib.h
@@ -473,7 +473,7 @@ struct cpp_callbacks
/* Called to emit a diagnostic if client_diagnostic option is true.
This callback receives the translated message. */
- void (*error) (cpp_reader *, int, const char *, va_list)
+ void (*error) (cpp_reader *, int, const char *, va_list *)
ATTRIBUTE_PRINTF(3,0);
};