Improving Compiler Error Messages
Walter Bright
newshound1 at digitalmars.com
Sun May 2 19:20:00 PDT 2010
Marianne Gagnon wrote:
> If my code contains :
>
> foo(z); bar(z); foobar(x, y, z);
>
> then GCC will spew something like :
>
> error: no matching call for foo( type_error ) error: no matching call for
> bar( type_error ) error: no matching call for foobar( type_error )
>
> I think that if you indeed have as goal to reduce useless cascading error
> messages, then it would be great to avoid that; I would tend to say it'd work
> to just plain ignore any line using "z" after that, or avoid checking the
> type of "z" if we know it's an error. That'd spare lots of useless error
> messages :)
You're right, gcc has an incomplete implementation of this. The idea is that
there will be no further error messages if any part of those messages would
contain the "error" production.
dmd partially does that, and it's definitely the direction we want to push it.
More information about the Digitalmars-d
mailing list