Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid spurious warnings on *.pb.h files with MSVC #14507

Open
coryan opened this issue Jul 19, 2024 · 0 comments
Open

Avoid spurious warnings on *.pb.h files with MSVC #14507

coryan opened this issue Jul 19, 2024 · 0 comments
Labels
type: cleanup An internal cleanup or hygiene concern.

Comments

@coryan
Copy link
Contributor

coryan commented Jul 19, 2024

Files generated by Protobuf have warnings under MSVC. There is little we can do to fix the code to avoid warnings, and disabling the warnings for all the code would mask problems in our code.

We can disable warnings in headers with MSVC if the header is included as #include <foo/bar.pb.h> as opposed to #include "foo/bar.pb.h". We have managed to fix this for googleapis protos, and the compute protos, but the test protos in google-cloud-cpp are not.

If we move the protos to protos/... (as oppposed to google/cloud/... or generator/...) then we can tweak Bazel and CMake to support include via angle brackets, then the warnings go away, and then we can start using newer versions of Protobuf with MSVC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant