This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: named warnings & individual warning control
Any feedback on this? Two days without an argument makes me feel left
out ;-)
> Summary:
>
> Take our existing functions, like warning(), and add a parameter that
> indicates the warning group the message is in. We can mechanically
> add "0" for starters, and expand from there. Using OPT_* for the
> group ties us in to the existing options.
>
> Add #pragma to enable/disable warning groups. Keep track of the state
> of the warning controls, when a warning comes through we find the
> right state based on file/line info.
>
> Eventually we'll define useful warning groups, and move control of
> those groups into the diagnostic code (i.e. out of c-opt.c). We can
> also move the conditional logic there (i.e. the if (warn_*) ...).
>
> Eventually groups will be defined with enough resolution to
> effectively give control over individual warnings (although some might
> have multiple wordings).
>
> We can also, in parallel, replace the old "if (warn_*)" code with "if
> (warn_p(OPT_*))" where it's still needed, and get rid of a lot of
> global variables (plus allow for more interesting logic for some
> warnings).