The vulnerability as described in ISO/IEC 24772-1 clause 6.58 applies to C++. Appendix D “Compatibility features” of ISO/IEC 14882:2020 enumerates the deprecated features. The C++ attribute [[deprecated]]
allows library writers and users to mark deprecated declarations.
Although backward compatibility is sometimes offered as an option for compilers so one can avoid changes to code to be compliant with current language specifications, updating the legacy software to the current standard is a better option.
To avoid the vulnerability or mitigate its ill effects, C++ software developers can:
Follow the avoidance mechanisms of ISO/IEC 24772-1 clause 6.58.5.
Enable compiler options or use static analysis tools that identify the use of deprecated features.
Apply the [[deprecated ("*reason*")]]
attribute to obsolete declarations that exist only for backward compatibility.