Clang error recovery

Walter Bright newshound1 at digitalmars.com
Tue Apr 6 14:52:57 PDT 2010


Don wrote:
> There's also an ErrorExpression which is used in many places, and it 
> generally works properly in supressing errors. (__error shows up in 
> error messages when it hasn't been treated properly).

Attempting to correct the error and move forward with the compilation sounds 
good, but generally is a hopeless failure. A far better approach, one that is 
half-implemented in dmd, is to replace failed types, expressions, etc., with 
special error productions, and then suppress further messages that have as 
operands one of those error productions.

It's analogous to using NaNs in floating point.



More information about the Digitalmars-d mailing list