[cfe-dev] numbered warnings & errors?

Zhanyong Wan (λx.x x) wan at google.com
Wed Dec 23 21:43:57 PST 2009


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.)

Thoughts?  Thanks,


More information about the cfe-dev mailing list