cpplib: Start moving switch handling to front ends

Neil Booth neil@daikokuya.co.uk
Thu Aug 8 11:25:00 GMT 2002


Stan Shebs wrote:-

> I agree, although the old proposal is distasteful to me, in that it
> takes details of message phrasing and glues them into users' sources.
> 
> 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.  Although the names do add to the
> code, warnings-conscious users need well-defined terminology to talk
> with each other about which warnings they're interested in.  Explicit
> names also allow us to use the same name if the exigencies of coding
> require the use to multiple warning() calls for a single kind of
> warning.

Hmm, OK, interesting.  But how is this better than just numbering
each warning?

Neil.



More information about the Gcc-patches mailing list