-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.13.0
-
Component/s: libbson
-
None
-
Environment:Visual Studio 2017 15.8.8
x86 (32-bit) target architecture
On Windows (with ___MSC_VER defined), the bson-macros.h header defines BSON_ALIGN_OF_PTR to 4 for 32-bit target architectures.
With BSON_EXTRA_ALIGN not defined, this results in structures being declared with an alignment of 4 which is less then the default packing size (which is 8, unless overridden using /Zp which is not recommended in practice) and will be ignored.
When using libbson in a C++ project and hence compiling libbson headers in C++ mode, this prints the following compiler warning:
\include\libbson-1.0\bson\bson-types.h(296,0): Warning C4359: '_bson_value_t': Alignment specifier is less than actual alignment (8), and will be ignored.
- related to
-
CDRIVER-2957 Consider adding an option to disable all alignment specifiers
- Closed