Skip to content

Conversation

@bdash
Copy link
Contributor

@bdash bdash commented Dec 16, 2025

A BN_DEPRECATED macro is introduced that expands to a [[deprecated(msg)]] attribute. Using functions that are annotated as deprecated will generate a compiler warning. This should help make users aware that they should migrate to replacement APIs, making it safer for us to remove the deprecated APIs in a future release.

Fixes #7802.

@plafosse plafosse self-assigned this Jan 9, 2026
@plafosse
Copy link
Member

plafosse commented Jan 9, 2026

This is great but but looks like some unrelated whitespace changes slipped in too.

@bdash
Copy link
Contributor Author

bdash commented Feb 2, 2026

This is great but but looks like some unrelated whitespace changes slipped in too.

Not sure if it's what you're referring to, but the changes in platform_linux.cpp are updating code that was using a deprecated API to use the replacement.

@bdash bdash force-pushed the test_cpp_deprecated_attr branch from 9ccb29d to c2e9d5d Compare February 2, 2026 17:23
A `BN_DEPRECATED` macro is introduced that expands to a `[[deprecated(msg)]]`
attribute. Using functions that are annotated as deprecated will
generate a compiler warning. This should help make users aware that they
should migrate to replacement APIs.
@bdash bdash force-pushed the test_cpp_deprecated_attr branch from c2e9d5d to 45ecf56 Compare February 2, 2026 22:14
@bdash bdash merged commit 45ecf56 into dev Feb 2, 2026
1 check passed
@bdash bdash deleted the test_cpp_deprecated_attr branch February 2, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annotate deprecated C++ APIs with [[deprecated(msg)]]

3 participants