<div dir="ltr">I agree with Walter here. Maintaining error numbers for all errors would require not little cost for compiler code and documentations, AND it will slow down compiler improvements for more better diagnostic messages so we would need to keep backward compatibility of error numbers.<div>
<br></div><div>I'll refuse to maintain error number feature.<br><div class="gmail_extra"><br></div><div class="gmail_extra">Kenji Hara<br><br><div class="gmail_quote">2014-03-30 5:11 GMT+09:00 H. S. Teoh <span dir="ltr"><<a href="mailto:hsteoh@quickfur.ath.cx" target="_blank">hsteoh@quickfur.ath.cx</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Sat, Mar 29, 2014 at 12:00:51PM -0700, Walter Bright wrote:<br>

> On 3/29/2014 11:02 AM, Brad Anderson wrote:<br>
> >For example, in VC++ if you get "C2001 newline in constant" you<br>
> >can just lookup C2001<br>
> ><a href="http://msdn.microsoft.com/en-us/library/4x3c2e37.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/4x3c2e37.aspx</a><br>
><br>
> Or you could look up "newline in constant".<br>
><br>
> My point is there's nothing magical about using a number instead. It<br>
> simply does not enable new features that aren't already there.<br>
<br>
</div></div>I think there's merit in using an error number. It allows easier<br>
programmatic processing, for example. An IDE might want to detect<br>
certain error numbers and give some more specific user feedback or<br>
suggest possible fixes.<br>
<br>
While you *could* do the same with just a string lookup, that's unstable<br>
because presumably, compiler error messages would be improved every now<br>
and then, and you don't want a simple rephrasing of the error to require<br>
updating every single IDE and other tool just to match the new wording<br>
of the same error.<br>
<br>
Also, not every error needs a separate number; some parts of the<br>
compiler may generate different error messages for what is essentially<br>
the same underlying problem (this may depend on the specific evaluation<br>
order of the erroneous input, for example). By assigning a single error<br>
number for both messages, you can aid automated processing tools like<br>
IDEs to treat a variety of messages as a single logical problem that can<br>
be uniformly handled.<br>
<br>
To do the same using string lookups will require unnecessary additional<br>
effort on the part of the IDE/tool implementor. (And it would break as<br>
soon as a PR that improves compiler error messages gets pulled.)<br>
<span class=""><font color="#888888"><br>
<br>
T<br>
<br>
--<br>
VI = Visual Irritation<br>
</font></span></blockquote></div><br></div></div></div>