On Thu, 4 Oct 2018, Jeff Law wrote: > With the natural tensions around warning early vs warning late the > warning analysis phase may choose to mark statements in various ways > rather than issuing the warning at that time. ie, it might choose to > mark the statement with the set of potential issues as well as marking > those which were proven safe. A later pass could then refine things and > issue the actual warning. Or something like that.
Note that could include front ends marking expressions for warning issues as well. (E.g. the signed/unsigned warnings, which fold and do some crude checks for cases where they can prove the signed value is never negative.) To avoid that front-end folding you want later code outside the front end to have the information that there was a (comparison / implicit conversion from signed to unsigned) that should be warned about if the later code can't prove the conversion was value-preserving. -- Joseph S. Myers jos...@codesourcery.com