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


2009/10/15 Richard Stallman <rms@gnu.org>:
> ? ?In principle the location range information would be only internal for
> ? ?GCC. The option that enables it to be shown in the output would allow
> ? ?external programs (like emacs, IDEs, a custom wrapper, or GCC's
> ? ?regression tester) to parse the output of GCC. In fact, what such
> ? ?programs would do is to turn OFF the caret information and turn ON the
> ? ?location range information, in order to provide their own custom caret
> ? ?information.
>
> Given that plan, why not output the arg location information
> in separate lines distinguished by some special prefix?

Could you provide an example of what you have in mind? For example, to
represent this:

exprs.c:47:15:{47:8-47:14}{47:17-47:24}: error: invalid operands
  to binary expression ('int *' and '_Complex float')

Please bear in mind that the format should be easily parsable by
machines, in order to be able to associate the ranges with the
appropriate error message, and not parse it as multiple independent
messages.

> ? ?> How exactly do people propose to use that location range information?
>
> ? ?As far as I know, at least one IDE is using it to parse the output of
> ? ?Clang and provide custom caret information in the IDE interface.
>
> Are you saying that clang already outputs the argument range information
> in this format?

Yes, it does if this is enabled usng the appropriate option.

Cheers,

Manuel.


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