]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
error.c (show_locus): Add trailing colon in error messages.
authorBrooks Moses <brooks.moses@codesourcery.com>
Sun, 5 Nov 2006 00:28:08 +0000 (00:28 +0000)
committerBrooks Moses <brooks@gcc.gnu.org>
Sun, 5 Nov 2006 00:28:08 +0000 (16:28 -0800)
* fortran/error.c (show_locus): Add trailing colon in error messages.
(error_print): Avoid leading space in error lines.
* testsuite/lib/gfortran-dg.exp (gfortran-dg-test): Adjust pattern
for matching error messages.

From-SVN: r118491

gcc/fortran/ChangeLog
gcc/fortran/error.c
gcc/testsuite/ChangeLog
gcc/testsuite/lib/gfortran-dg.exp

index 64d3bafa8d489d9c2f8aab30ab08148da56e8480..6cc6b20301b628824627d81b20b8adc6474880ec 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-04  Brooks Moses  <brooks.moses@codesourcery.com>
+
+       * error.c (show_locus): Add trailing colon in error messages.
+       (error_print): Avoid leading space in error lines.
+
 2006-11-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR fortran/29713
index c4ef9d642e0b032ca885653ceb3389d06d404302..e532830882c57c2bd79ec3eb110d54ff77fbe9fd 100644 (file)
@@ -134,7 +134,7 @@ show_locus (int offset, locus * loc)
 
   lb = loc->lb;
   f = lb->file;
-  error_printf ("%s:%d\n", f->filename,
+  error_printf ("%s:%d:\n", f->filename,
 #ifdef USE_MAPPED_LOCATION
                LOCATION_LINE (lb->location)
 #else
@@ -380,7 +380,8 @@ error_print (const char *type, const char *format0, va_list argp)
   if (have_l1)
     show_loci (l1, l2);
   error_string (type);
-  error_char (' ');
+  if (*type)
+    error_char (' ');
 
   have_l1 = 0;
   format = format0;
index 925f5b3d38eb2545c83057d8b0ab935ca23ddddb..7bce686264e54ae2dd6dbe10ab89f271e539fb8b 100644 (file)
@@ -1,3 +1,8 @@
+2006-11-04  Brooks Moses  <brooks.moses@codesourcery.com>
+
+       * lib/gfortran-dg.exp (gfortran-dg-test): Adjust pattern
+       for matching error messages.
+
 2006-11-04  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/26915
index 421e4a49eaca22234ebc3e82d851c48e12d538fc..1c50ef7393e292a93f9ec4ac38c4a1d1ea66f7dd 100644 (file)
@@ -26,23 +26,23 @@ proc gfortran-dg-test { prog do_what extra_tool_flags } {
     set output_file [lindex $result 1]
 
     # gfortran error messages look like this:
-    #      [name]:[line]
+    #     [name]:[line]:
     #
     #        some code
     #              1
     #     Error: Some error at (1)
     # or
-    #      [name]:[line]
+    #     [name]:[line]:
     #
     #       some code
     #              1
-    #      [name]:[line2]
+    #     [name]:[line2]:
     #
     #       some other code
     #         2
     #     Error: Some error at (1) and (2)
     # or
-    #      [name]:[line]
+    #     [name]:[line]:
     #
     #       some code and some more code
     #              1       2
@@ -59,7 +59,7 @@ proc gfortran-dg-test { prog do_what extra_tool_flags } {
     # Note that these regexps only make sense in the combinations used below.
     # Note also that is imperative that we first deal with the form with
     # two loci.
-    set locus_regexp " (\[^\n\]*)\n\n\[^\n\]*\n\[^\n\]*\n"
+    set locus_regexp "(\[^\n\]*):\n\n\[^\n\]*\n\[^\n\]*\n"
     set diag_regexp "(\[^\n\]*)\n"
 
     set two_loci "$locus_regexp$locus_regexp$diag_regexp"