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 291e1738fe85ae8530a87d9f9ddd28333240dc7f..3adc303036df62e4a66f42351e9c673d847c5a63 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 af973d60a2c3ba85752aacbba8e66ebbed45e776..9f79a26253c095dc804bd3fa35292dcf1a8a9f71 100644 (file)
@@ -2395,6 +2395,9 @@ cp_error_at (const char *msgid, ...)
   va_end (ap);
 
   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);