re PR c++/13560 (wrong file name in error message)
authorAndrew Pinski <pinskia@physics.uc.edu>
Thu, 21 Oct 2004 16:14:29 +0000 (16:14 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Thu, 21 Oct 2004 16:14:29 +0000 (09:14 -0700)
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

gcc/cp/ChangeLog
gcc/cp/error.c

index 291e173..3adc303 100644 (file)
@@ -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.
index af973d6..9f79a26 100644 (file)
@@ -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);