[CDRIVER-3656] Calling convention attributes must be included on function definitions Created: 06/May/20  Updated: 10/Feb/23

Status: Backlog
Project: C Driver
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CDRIVER-4577

 Description   

Compiling with VS 2017 using /Gv, which overrides the default calling convention, output many many errors like so:

 c:\data\mci\ee4d4a8fcc4cc8cd7bc7dec05224e73c\mongoc\src\libbson\src\bson\bson-value.c(25): error C2373: 'bson_value_copy': redefinition; different type modifiers [C:\data\mci\ee4d4a8fcc4cc8cd7bc7dec05224e73c\mongoc\src\libbson\bson_static.vcxproj]

I believe this is due to the __cdecl attribute being included in the header declaration (via BSON_CALL), but not the function definitions.

Patch build with /Gv: https://evergreen.mongodb.com/task/mongo_c_driver_windows_2017_debug_compile_alt_calling_convention_patch_3da9e662303a488773559ba8ef34fd1d70d0d092_5eb326350ae60671ae9196af_20_05_06_21_04_01


Generated at Wed Feb 07 21:18:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.