From: brooks Date: Sun, 5 Nov 2006 00:28:08 +0000 (+0000) Subject: * fortran/error.c (show_locus): Add trailing colon in error messages. X-Git-Tag: upstream/4.9.2~52200 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9831a60597a4c72d1a1aef2566ff6242eeed490a;p=platform%2Fupstream%2Flinaro-gcc.git * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118491 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 64d3baf..6cc6b20 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-11-04 Brooks Moses + + * error.c (show_locus): Add trailing colon in error messages. + (error_print): Avoid leading space in error lines. + 2006-11-04 Francois-Xavier Coudert PR fortran/29713 diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index c4ef9d6..e532830 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 925f5b3..7bce686 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-11-04 Brooks Moses + + * lib/gfortran-dg.exp (gfortran-dg-test): Adjust pattern + for matching error messages. + 2006-11-04 Uros Bizjak PR target/26915 diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp index 421e4a4..1c50ef7 100644 --- a/gcc/testsuite/lib/gfortran-dg.exp +++ b/gcc/testsuite/lib/gfortran-dg.exp @@ -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"