From: | Mary Fernandez <mff@research.att.com> |
Newsgroups: | comp.compilers |
Date: | 11 Feb 1997 22:50:55 -0500 |
Organization: | Compilers Central |
References: | 97-01-258 |
Keywords: | errors |
J. Kanze wrote:
> > What makes it hard(er) is that the programmers don't cooperate. If
> > you accept that the compiler just aborts after the first error, it
> > will be a lot simpler. Of course, I'd never buy such a compiler:-).
> James Kanze wrote:
> Excellent remark. If the turn around time is fast enough, it is
> preferable to get one correct error message, that a number which may
> or may not be correct. (Turn around time or no, I tend to ignore most
> errors following the first one in C++, because almost any error seems
> to get the compiler so confused that the rest are worthless anyway.)
I'd recommend looking at a recent paper by Norman Ramsey on
eliminating spurious error messages from compiler output. The
abstract is at:
http://www.cs.virginia.edu/~nr/pubs/error-abstract.html
He describes a technique that enables a compiler to emit only
non-spurious error messages, i.e., messages not caused by cascading
errors. This guarantees that the compiler produces the minimum number
of error messages for the entire compilation unit and avoids the
fallback solution of aborting after the first error. It's a good
paper to read if you write compilers and/or teach a class on
compilers.
+-------------------------------------------------+
Mary Fernandez mff@research.att.com
Senior Technical Staff Member 908-582-6567
AT&T Labs FAX: 908-582-4113
600 Mountain Ave, 2C-147A http://www.research.att.com/info/mff
Murray Hill, NJ 07974
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.