On Mon, Dec 19, 2016 at 10:52:13AM -0700, Jeff Law wrote: > > No, it highlights that the warning is done in a wrong place where it suffers > > from too many false positives. > I don't inherently see this as generating "too many false positives". And as > Martin says, the warning works with precisely what it is presented. > > I think the particular stumbling point is path isolation at some point as > resulted in a NULL explicitly in calls at various places. That is a *GOOD* > thing to detect and warn against as it represents cases that are often well > hidden and often difficult for a human to analyze (based on my work with > NULL pointer dereference warnings).
Please see e.g. PR78859 for just two recently reported issues (there are more from gathering what has been said on IRC etc., David said powerpc* bootstrap is still broken, ...). One has the non-NULL tests just as a weirdo programming style, not actually a sign that NULL will ever show there. So this one could be fixed in theory rather than adding hacks to assert it is non-NULL just remove all those NULL tests. The other is just too cryptic, there is not even locus printed for the strlen, so nobody can guess where it is coming from, guessing why will be hard even if location is provided. Jakub