This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Part 1 of Zack's integer parsing overhaul
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Neil Booth <neil at daikokuya dot demon dot co dot uk>, <gcc-patches at gcc dot gnu dot org>, Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: Thu, 30 May 2002 21:33:50 -0400 (EDT)
- Subject: Re: Part 1 of Zack's integer parsing overhaul
On Wed, 29 May 2002, Zack Weinberg wrote:
> On Wed, May 29, 2002 at 06:06:40PM +0100, Neil Booth wrote:
> > Done. What I *really* want is caret diagnostics. If we have that,
> > I think we can justifiably simplify many "overly precise" diagnostics
> > like this to be just "syntax error in numeric constant" or somesuch,
> > and by pointing to the precise character that raised the problem
> > it is at least as obvious what the problem is.
>
> I think it's worthwhile being detailed about what's wrong even if we
> do have caret diagnostics. More detail means less chance for
> confusion.
>
> > I would work on implementing this tomorrow. The only thing preventing
> > me doing so is agreeing a format for diagnostics, so it's obvious to
> > a tool where one ends and the next begins. It is pointless attempting
> > it if we can't filter the caret and the quoted line within DejaGnu,
> > or at least extract the real diagnostic message from the surrounding
> > bumph.
>
> G77 has caret diagnostics already - you might see if that style will
> do. I don't have any better ideas at the moment, anyway.
Since nobody mentioned it: the GNU coding standards
<URL:http://www.gnu.org/prep/standards.html#SEC15> have a say
here. It would be nice at least if GCC and Emacs be kept in
sync wrt. locating error sites from messages. :-)
brgds, H-P