On Thu, Nov 20, 2025 at 09:17:16AM +0100, Miguel Ojeda wrote: > On Wed, Nov 19, 2025 at 11:44 PM Kees Cook <[email protected]> wrote: > > > > Enable GCC 16's coming "-fdiagnostics-show-context=2" option[1] to > > provide enhanced diagnostic information for value-tracking warnings, which > > displays the control flow chain leading to the diagnostic. This covers our > > > existing use of -Wrestrict and -Wstringop-overread, and gets us closer to > > enabling -Warray-bounds, -Wstringop-overflow, and -Wstringop-truncation. > > I am probably missing some context, but in what sense gets us closer? > Do you mean it will make it easier to understand those when we enable > them? i.e. we still can't enable them until the minimum is upgraded, > right?
Right -- we've been tracking down -Warray-bounds warnings for several years now and it has been quite difficult to determine which are "real" and which are false positives. This option makes the "real" cases much more obvious. I will improve the commit log. > Apart from that, it looks like a nice improvement on the output from > the PR examples -- I didn't test it, but the patch itself looks fine > of course: > > Reviewed-by: Miguel Ojeda <[email protected]> Thanks! -- Kees Cook
