This is the mail archive of the
mailing list for the GCC project.
Re: named warnings & individual warning control
DJ Delorie wrote:
Looks plausible to me, except that I think you should be using a
logarithmic method to find the matching string, not a linear method.
Note that you could get some of the same benefits by just adding the
#pragmas for the current warning groups,
Partial patch (proof of concept, missing docs, changelog, etc), only
works for options with the Var() syntax... Comments?
I'm not sure what to say about the problem in the last paragraph; that's
clearly a serious user interface issue. This is part of why I have long
argued that only front ends should be permitted to issue warnings, and
that all attempts to use back-end data flow analysis to issue warnings
are mistaken, no matter how clever they seem.
Also, -O tends to confuse this as they defer the use of warning
flags until after the whole file is parsed, so pragmas between
function definitions don't do what you expect :-(