This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error messages with ranges


On Fri, 16 Oct 2009, Chris Lattner wrote:

> On Oct 16, 2009, at 9:51 AM, Gabriel Dos Reis wrote:
> 
> > On Fri, Oct 16, 2009 at 3:47 AM, Richard Stallman <rms@gnu.org> wrote:
> > > How about something like this:
> > > 
> > >   exprs.c:47:15: error: invalid operands to binary expression ('int *' and
> > > '_Complex float')
> > >   ::Argument locations: 47:8-47:14, 47:17-47:24
> > > 
> > > If the brace notation you've proposed becomes a de facto standard,
> > > we may as well go along with it.  But I think this proposal
> > > is better intrinsically, since it is less clutter and no harder to parse.
> > 
> > I like the non-braced version.
> > 
> > However, I would like you clarify the '::Argument locations:' marker.
> > Do you intend the double colons '::' as token to introduce
> > some form of meta data for tools? (In this case, it is to introduce
> > locus, but is it an escape for more general tags?)
> 
> FWIW, clang uses ranges for a lot of things other than arguments.

I was presuming that in the above the initial "::" is the signal to IDEs 
or other diagnostic parsers, meaning that "Argument locations" is to be 
taken as English text that should be translated to the user's language, 
and so IDEs should not ascribe any significance to the specific phrase 
"Argument locations" because they need to handle translations to other 
languages as well.  With the specific phrase not being significant, it is 
of course possible to put other phrases there if it's felt useful to 
attach a natural language name to the other locations in that way.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]