This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: named warnings & individual warning control


DJ Delorie wrote:

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?


Looks plausible to me, except that I think you should be using a logarithmic method to find the matching string, not a linear method.

Also, -O[23] 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 :-(

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.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]