[lld] [lld][NFC] Silence -Wuninitialized GCC warnings. (PR #75183)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 13:59:03 PST 2023


mstorsjo wrote:

> > I believe clang does a better job with sometimes-ininitialized warnings, perhaps we should just disable GCC's overly conservative warning, rather than adding unnecessary initializers? (that would hinder Clang's better warning and sanitizer detections)
> 
> I agree. I have seen several instances that GCC `-Wuninitialized` is annoying than useful.

In this case, it seems like the issue only exists in older GCC versions though, but I'm not sure if we'd like to do such a change depending on GCC version either. So perhaps it would indeed be best to skip such warnings altogether on GCC.

https://github.com/llvm/llvm-project/pull/75183


More information about the llvm-commits mailing list