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

MSC compile warnings #17821

Open
torsten48 opened this issue Aug 14, 2024 · 2 comments
Open

MSC compile warnings #17821

torsten48 opened this issue Aug 14, 2024 · 2 comments
Assignees

Comments

@torsten48
Copy link

What version of protobuf and what language are you using?
28.0-rc2
Language: C++/

What operating system (Linux, Windows, ...) and version?
Windows 10

What runtime / compiler are you using (e.g., python version or gcc version)
MSVC 19.40.33811.0 (64bit)
Windows SDK 10.0.22621.0
cmake 3.30.2

What did you do?
Steps to reproduce the behavior:
build protobuf via cmake

What did you expect to see
no warnings

What did you see instead?
protobuf\third_party\utf8_range\utf8_range.c(38): warning C4141: 'inline': used more than once
protobuf\third_party\utf8_range\utf8_range.c(45): warning C4141: 'inline': used more than once
protobuf\third_party\utf8_range\utf8_range.c(49): warning C4141: 'inline': used more than once
protobuf\third_party\utf8_range\utf8_range.c(178): warning C4141: 'inline': used more than once
protobuf\upb\mem\arena.c(327): warning C4116: unnamed type definition in parentheses
protobuf\src\google\protobuf\wire_format_lite.cc(669): warning C4068: unknown pragma 'clang'
protobuf\src\google\protobuf\wire_format_lite.cc(711): warning C4068: unknown pragma 'clang'

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

@torsten48 torsten48 added the untriaged auto added to all issues by default when created. label Aug 14, 2024
@bebuch
Copy link

bebuch commented Sep 3, 2024

MSVC issues a warning here because both __forceinline and inline are declared.

@grpc-devs: Is changing PROTOBUF_ALWAYS_INLINE from __forceinline to [[msvc::forceinline]] an option? This should solve the issue.

@googleberg
Copy link
Member

@ericsalo can you see if theres a straightforward fix for this?

@googleberg googleberg removed the untriaged auto added to all issues by default when created. label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants