On Fri, Sep 11, 2020 at 08:22:36AM -0700, Jakub Kicinski wrote: > On Fri, 11 Sep 2020 12:11:58 +0100 Russell King - ARM Linux admin wrote: > > On Thu, Sep 10, 2020 at 05:31:42PM -0700, Nathan Chancellor wrote: > > > Ah great, that is indeed cleaner, thank you for letting me know! > > > > Hmm, I'm not sure why gcc didn't find that. Strangely, the 0-day bot > > seems to have only picked up on it with clang, not gcc. > > May be similar to: https://lkml.org/lkml/2019/2/25/1092 > > Recent GCC is so bad at catching uninitialized vars I was considering > build testing with GCC8 :/
It is even simpler than that, the warning was straight up disabled in commit 78a5255ffb6a ("Stop the ad-hoc games with -Wno-maybe-initialized"). clang's -Wuninitialized and -Wsometimes-uninitialized are generally more accurate but can have some false positives because the semantic analysis phase happens before inlining and dead code elimination. Cheers, Nathan