This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] v4 of diagnostic_show_locus and rich_location
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: Dodji Seketeli <dodji at seketeli dot org>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Tobias Burnus <burnus at net-b dot de>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Mon, 12 Oct 2015 17:36:58 +0100
- Subject: Re: [PATCH] v4 of diagnostic_show_locus and rich_location
- Authentication-results: sourceware.org; auth=none
- References: <1442957171-22904-1-git-send-email-dmalcolm at redhat dot com> <1442957171-22904-3-git-send-email-dmalcolm at redhat dot com> <86h9miswzc dot fsf at seketeli dot org> <1443211881 dot 30732 dot 121 dot camel at surprise> <86vbawisuy dot fsf at redhat dot com> <1444664698 dot 17932 dot 24 dot camel at surprise>
On 12 October 2015 at 16:44, David Malcolm <dmalcolm@redhat.com> wrote:
> v4 of the patch does the conversion of Fortran, and eliminates the
> adaptation layer. No partial transitions here!
>
> Manu: I hope this addresses your concerns.
Yes, it looks great. I don't understand how this
- and for two locations that do not fit in the same locus line:
-
- [name]:[locus]: Error: (1)
- [name]:[locus2]: Error: Some error at (1) and (2)
+ [locus of primary range]: Error: Some error at (1) and (2)
passes the Fortran regression testsuite since the testcases normally
try to match the two locus separately, but I guess you figured out a
way to make it work and I must admit I did not have the time to read
the patch in deep detail. But it is a bit strange that you also
deleted this part:
- With -fdiagnostic-show-caret (the default) and for valid locations,
- it prints for one location:
+ With -fdiagnostic-show-caret (the default) it prints:
- [locus]:
+ [locus of primary range]:
some code
1
Error: Some error at (1)
- for two locations that fit in the same locus line:
+ With -fno-diagnostic-show-caret or if the primary range is not
+ valid, it prints:
- [locus]:
-
- some code and some more code
- 1 2
- Error: Some error at (1) and (2)
-
- and for two locations that do not fit in the same locus line:
-
- [locus]:
-
- some code
- 1
- [locus2]:
-
- some other code
- 2
- Error: Some error at (1) and (2)
-
which should work the same before and after your patch. Independently
of whether the actual logic moved into some new mechanism in the new
rich locations world, this seems like useful info to keep in
fortran/error.c.
Cheers,
Manuel.