aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-10-21 16:14:29 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-10-21 09:14:29 -0700
commit22a49f184a6dbc65d09d6326b39e6ff8ef6f411a (patch)
treeab22bab6638477e07b0e7b45b86a749bed9159f9 /gcc/cp
parent08445125467d0e63f3d0d7b30ccd218e09b0ecac (diff)
downloadgcc-22a49f184a6dbc65d09d6326b39e6ff8ef6f411a.zip
gcc-22a49f184a6dbc65d09d6326b39e6ff8ef6f411a.tar.gz
gcc-22a49f184a6dbc65d09d6326b39e6ff8ef6f411a.tar.bz2
re PR c++/13560 (wrong file name in error message)
2004-10-21 Andrew Pinski <pinskia@physics.uc.edu> PR c++/13560 * error.c (cp_error_at): Output the context as it might be different file as the other location. From-SVN: r89382
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/error.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 291e173..3adc303 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR c++/13560
+ * error.c (cp_error_at): Output the context as it might be
+ different file as the other location.
+
2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
* typeck.c: Fix a comment typo.
diff --git a/gcc/cp/error.c b/gcc/cp/error.c
index af973d6..9f79a26 100644
--- a/gcc/cp/error.c
+++ b/gcc/cp/error.c
@@ -2396,6 +2396,9 @@ cp_error_at (const char *msgid, ...)
va_start (ap, msgid);
diagnostic_set_info (&diagnostic, msgid, &ap,
+ input_location, DK_ERROR);
+ cp_diagnostic_starter (global_dc, &diagnostic);
+ diagnostic_set_info (&diagnostic, msgid, &ap,
location_of (here), DK_ERROR);
report_diagnostic (&diagnostic);
va_end (ap);