On Fri, Dec 16, 2016 at 09:36:25AM -0700, Martin Sebor wrote: > > It does for me with an allmodconf. At -O2 I get three warnings, and at > > -O3 I get two additional warnings. Now these additional ones happen way > > too deep into the pipeline to be reliable. (For a reduced testcase see: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78817#c8) > > The warning looks quite justified in this case. The first call > to sm_read_sector exits with the pointer being null and so the > second call is diagnosed. That seems like a great example of > when the warning is useful.
No. The first call to sm_read_sector just doesn't exit. So it is warning about dead code. > I don't claim it can't be improved but it seems pretty good as > it is already. Among the 6 instances it's found in GCC three > look like real bugs. None look like real bugs to me. Jakub