named warnings & individual warning control

Mark Mitchell mark@codesourcery.com
Fri Jun 25 05:13:00 GMT 2004


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



More information about the Gcc mailing list