-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
C Drivers
The mongoc_log_func_t typedef is used in the parameters of exported function symbols declared with __cdecl (including mongoc_log_default_handler) but is not declared with __cdecl, meaning a different default calling convention (e.g. __vectorcall with /Gv) changes the calling convention of the mongoc_log_func_t type and dependent exported function symbols. This means the following program fails to link with /Gv:
void broken(void) { // error: mongoc_log_default_handler is declared with __cdecl, but due to /Gv, // mongoc_log_set_handler requires a function pointer with __vectorcall // because mongoc_log_func_t is missing __cdecl, so mongoc_log_default_handler // is not considered a valid argument (incompatible pointer types). mongoc_log_set_handler(&mongoc_log_default_handler, NULL); }
- related to
-
CXX-3093 Exported v_noabi functions are missing __cdecl on Windows
- Closed