From 22a49f184a6dbc65d09d6326b39e6ff8ef6f411a Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Thu, 21 Oct 2004 16:14:29 +0000 Subject: [PATCH] re PR c++/13560 (wrong file name in error message) 2004-10-21 Andrew Pinski PR c++/13560 * error.c (cp_error_at): Output the context as it might be different file as the other location. From-SVN: r89382 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/error.c | 3 +++ 2 files changed, 9 insertions(+) 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 + + 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 * 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); -- 2.7.4