This is the mail archive of the 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]

Re: Really crummy error messages, was Re: Ada files now checked in

On 08-Oct-2001, Tim Hollebeek <> wrote:
> On Mon, Oct 08, 2001 at 04:32:25PM -0400, Phil Edwards wrote:
> > 
> > > While we're bitching, I am sick of seeing
> > > 
> > > test.c:1: (Each undeclared identifier is reported only once
> > > test.c:1: for each function it appears in.)
> > > 
> > > I think the error message is perfectly clear without that.
> > 
> > I'd agree with this too.  Maybe GCC should have a beginner's mode?  :-)
> how about --verbose-errors, and have both a one-line and paragraph
> explanation of each error?
>   test.c:1: Message always goes here
>   test.c:1: (iff --verbose errors, extended explanation
>   test.c:1:  more...
>   test.c:1:  etc)
> This way you can normally use the normal options, and stick in
> --verbose-errors when you see a new message or one you don't
> understand.

We've used almost exactly that approach in the Mercury compiler,
and IMHO it works reasonably well.

One drawback with this approach as you have outlined it is that
beginners, who are the ones that most need the verbose error messages,
don't know to use the `--verbose-errors' option.  To alleviate this
problem, at the end of all the compilation errors, the Mercury compiler
outputs the following additional message:

	Recompile with `--verbose-errors' for more information.

Fergus Henderson <>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <>  |     -- the last words of T. S. Garp.

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