The vulnerability as documented in ISO/IEC 24772-1:2024, 6.49 applies to C++.
As a mitigation, the C++ extern "C" linkage specifier usually provides simple interoperability with libraries using the C application binary interface (ABI).
If signatures are specified in C-compatible header file, conditional compilation based on the predefined preprocessor constant __cplusplus can ensure, that a C++ compiler is also able to process the header file.
To avoid the vulnerability or mitigate its ill effects, C++ software developers can:
Apply the avoidance mechanisms of ISO/IEC 24772-1:2024, 6.49.5.
Apply the avoidance mechanisms of clause 6.47 Inter-language Calling [DJS] as applicable.
Ensure compatiblity of C header files with the C++ language.