Description
What version of protobuf and what language are you using?
Version: main
Language: C++
What operating system (Linux, Windows, ...) and version?
Windows 11, ARM64
What runtime / compiler are you using (e.g., python version or gcc version)
MSVC
Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33139
What did you do?
Steps to reproduce the behavior:
- Build with MSVC for a Windows ARM64 device.
What did you expect to see
Successful build.
What did you see instead?
google\protobuf\parse_context.h(721,10): error C2059: syntax error: ':'
google\protobuf\parse_context.h(898,14): error C3861: 'Ubfx7': identifier not found
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/parse_context.h
Line 638 for potential patch.
Lines 721, 728 for breaking inline assembly.
I have noticed that other usages of inline assembly occur when either x86 architecture is defined, or when GNUC is defined. This line seems to be the only case that does not follow this. I'm not sure if this was intentional, or if #if defined(__aarch64__) && defined(__GNUC__)
just happened to be missed during the addition. Could also use !defined(_MSC_VER)
, if it was intentional for clang and gnu.
Additionally, ARM-specific assembly instructions, such as "UBFX" also fails with MSVC.
Activity