This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: cpplib: Start moving switch handling to front ends
On 08-Aug-2002, Stan Shebs <shebs@apple.com> wrote:
> If we're willing to touch the warnings in GCC, we could add an
> official name to each one that we want to control, so for instance
> you would say
>
> warning ("comparison-always-true",
> "comparison is always true due to limited range of data type");
>
> and that would automatically create -Wcomparison-always-true and
> add to a warning control pragma.
I like this idea.
It might be nice to combine this with another option called say
"-Wprint-warning-names", which would ensure that compiler
diagnostics included the names of the warnings, e.g.
foo.c:123: warning (comparison-always-true): comparison is always
true due to limited range of data type
I also prefer warning names to warning numbers.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.