[cfe-dev] numbered warnings & errors?

Chandler Carruth chandlerc at google.com
Wed Dec 23 21:54:20 PST 2009


On Wed, Dec 23, 2009 at 9:43 PM, Zhanyong Wan (λx.x x) <wan at google.com> wrote:
> Hi,
>
> Sorry if this has been discussed before.  What do people say to
> assigning each warning/error a number and printing that number as part
> of the compiler message, like what MSVC does?
>
> When we see a compiler error/warning, often we need to read up on what
> it really means.  A unique number is much easier to search for than
> the actual message, which can change from one version of Clang to
> another.  Also different warnings/errors may have similar messages,
> making a search even harder.
>
> Unique error/warning numbers also make it easier to suppress warnings
> using -W or #pragma.  When I see a warning message, I can suppress it
> using the warning number in it.  I don't have to look up the symbolic
> ID of the warning from the Clang documentation.  (While this problem
> can be solved by printing the symbolic ID as part of the message, it's
> visually more intrusive.)

Personally, I'd accept the intrusion to have something easier than a
number to refer to. It should be equally searchable. But I do agree
with printing some identifier, whatever form it takes.

>
> Thoughts?  Thanks,
>
> --
> Zhanyong
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>




More information about the cfe-dev mailing list