eddyz87 wrote: I looked at the example shared by Yonghong, the change clang does because of the uninitialized variable access is indeed quite dramatic. It computes a switch over `undef` and throws away all branches including "default". Basically throwing away most of the program.
Nevertheless, the issue is not really solved by using zero initialization, as that is not what programmer intended and might be equally as hard to debug. And this is not limited to BPF backend. If we really consider this issue to be a priority for BPF backend, I think we should invest time in better semantic warnings, or otherwise leave things as is. https://github.com/llvm/llvm-project/pull/125601 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits