Open dekiertanna opened 1 day ago
Thank you for the bug report. I find that if I build with that error enabled on gcc I see quite a few errors:
CC=/usr/bin/gcc CXX=/usr/bin/g++ bazel build -k //src/... -c opt --copt=-Werror=null-dereference --copt=-Wno-deprecated-declarations
However, I don't think these are necessarily real bugs. These look like false positives to me. I don't think we can prioritize working on actively making these errors go away, but we would be happy to review pull requests if you can figure out a way to do it.
What version of protobuf and what language are you using? Version: protobuflib: 5.27.4; protoc 27.4 (protobuf lite) Language: C++
What operating system (Linux, Windows, ...) and version? Linux, Red Hat Enterprise Linux Server 7.9 (Maipo)
What runtime / compiler are you using (e.g., python version or gcc version) GNU 12.2.0
What did you do? Steps to reproduce the behavior: Minimal reproduction included in attached files.
protobuf_lite_minimal_reproduction.zip
Generally, passing an rvalue (temporary value):
causes
What did you expect to see Compiled code
What did you see instead? Suspicious -Wnull-dereference error
Anything else we should know about your project / environment This issue was not happening on 24.4 version, started occurring after upgrading to protobuf 27.4