Warnings in header files can be a problem for consumers that enable `/WX` (or `-Werror`). In this case, using `... & -align` produces a warning (C4146) with MSVC. The fix is to use equivalent expression `... & ~(align - 1)`, which was already used in the same file.
Fixes#12675Closes#12697
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12697 from coryan:fix-msvc-warnings-in-arena-align 835f3b489a
PiperOrigin-RevId: 530137165
On Wndows, `size_t` is 64-bits, and `int` is 32-bits. That makes conversions from `size_t` to `int` potentially lossy, and they generate warnings. In this case an `int` variable was assigned to `size_t` and then passed to functions consuming `int`. Seems simpler to use `auto` and avoid these problems altogether.
Closes#12701
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12701 from coryan:fix-warnings-repeated-field-warnings-in-msvc b1ec34de77
PiperOrigin-RevId: 530134611
When the protobuf libraries have been compiled as shared libraries the users of the library need to add `-DPROTOBUF_USE_DLLS` to their build line. Otherwise some symbols are missing.
Fixes#12699
FWIW, I am not sure this is an ideal fix. It may be better to fix the headers such that no macros change the ABI.
Closes#12700
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/12700 from coryan:fix-define-protobuf-use-dlls-in-pkg-config-file 13c792eebd
PiperOrigin-RevId: 530116678
Note: gcc only supports docker images down to 9.5, and the 7.3 image is very old and problematic. A follow-up change might enable testing for GCC 7.3, which is our minimal supported version
PiperOrigin-RevId: 529885733
These more closely follow the standard practices of our users, where dependencies are pre-installed instead of using our provided sub-modules. This will prevent issues such as #12201 from reoccuring.
Additionally, this cl bumps our Abseil dependency to the latest release, and fixes a GTest issue that went previously unnoticed.
PiperOrigin-RevId: 529490402
changes.
(1) Use PROTOBUF_NOINLINE attributes to avoid inlining of
Clear(), ByteSizeLong() and IsInitialized() routines
within the same .pb.cc file
(2) If the tag number is less than 16 and the type is one of
a handful of common types, call a non-inlined templated
routine specialized for that tag number that handles both
the EnsureSpace call and the encoding of the tag and the
value into the array.
PiperOrigin-RevId: 529162319
Without it some compilers will not constant initialize the tables and cause
runtime failures during registration. We must be able to parse descriptors
during dynamic initialization.
PiperOrigin-RevId: 529092745
We found last week that Clang's support for `musttail` on 32-bit Linux does not
seem to work reliably, so let's disable it for now.
PiperOrigin-RevId: 528817403