-
Notifications
You must be signed in to change notification settings - Fork 579
[BUILD] Ignore deprecated warning #3845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ee13c73
d86b08d
2be52f7
cd63f5b
d798baa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -91,10 +91,22 @@ class NoopLoggerProvider final : public LoggerProvider | |||||||||||||||||
| }; | ||||||||||||||||||
|
|
||||||||||||||||||
| #if OPENTELEMETRY_ABI_VERSION_NO < 2 | ||||||||||||||||||
| # if defined(_MSC_VER) | ||||||||||||||||||
| # pragma warning(push) | ||||||||||||||||||
| # pragma warning(disable : 4996) | ||||||||||||||||||
| # elif defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__) | ||||||||||||||||||
| # pragma GCC diagnostic push | ||||||||||||||||||
| # pragma GCC diagnostic warning "-Wdeprecated-declarations" | ||||||||||||||||||
| # elif defined(__clang__) || defined(__apple_build_version__) | ||||||||||||||||||
| # pragma clang diagnostic push | ||||||||||||||||||
| # pragma clang diagnostic warning "-Wdeprecated-declarations" | ||||||||||||||||||
|
||||||||||||||||||
| # pragma GCC diagnostic warning "-Wdeprecated-declarations" | |
| # elif defined(__clang__) || defined(__apple_build_version__) | |
| # pragma clang diagnostic push | |
| # pragma clang diagnostic warning "-Wdeprecated-declarations" | |
| # pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
| # elif defined(__clang__) || defined(__apple_build_version__) | |
| # pragma clang diagnostic push | |
| # pragma clang diagnostic ignored "-Wdeprecated-declarations" |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -48,6 +48,16 @@ class OPENTELEMETRY_EXPORT Provider | |||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| #if OPENTELEMETRY_ABI_VERSION_NO < 2 | ||||||||||||||||||||||||||||||||||
| # if defined(_MSC_VER) | ||||||||||||||||||||||||||||||||||
| # pragma warning(push) | ||||||||||||||||||||||||||||||||||
| # pragma warning(disable : 4996) | ||||||||||||||||||||||||||||||||||
| # elif defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__) | ||||||||||||||||||||||||||||||||||
| # pragma GCC diagnostic push | ||||||||||||||||||||||||||||||||||
| # pragma GCC diagnostic warning "-Wdeprecated-declarations" | ||||||||||||||||||||||||||||||||||
| # elif defined(__clang__) || defined(__apple_build_version__) | ||||||||||||||||||||||||||||||||||
| # pragma clang diagnostic push | ||||||||||||||||||||||||||||||||||
| # pragma clang diagnostic warning "-Wdeprecated-declarations" | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| # pragma GCC diagnostic warning "-Wdeprecated-declarations" | |
| # elif defined(__clang__) || defined(__apple_build_version__) | |
| # pragma clang diagnostic push | |
| # pragma clang diagnostic warning "-Wdeprecated-declarations" | |
| # pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
| # elif defined(__clang__) || defined(__apple_build_version__) | |
| # pragma clang diagnostic push | |
| # pragma clang diagnostic ignored "-Wdeprecated-declarations" |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pragma directive #pragma clang diagnostic warning "-Wdeprecated-declarations" will cause deprecation warnings to be emitted as warnings for Clang, which contradicts the intent of suppressing these internal implementation warnings. This should be #pragma clang diagnostic ignored "-Wdeprecated-declarations" to suppress the warnings like it was before, matching the behavior for MSVC which uses disable : 4996.
| # pragma GCC diagnostic warning "-Wdeprecated-declarations" | |
| # elif defined(__clang__) || defined(__apple_build_version__) | |
| # pragma clang diagnostic push | |
| # pragma clang diagnostic warning "-Wdeprecated-declarations" | |
| # pragma GCC diagnostic ignored "-Wdeprecated-declarations" | |
| # elif defined(__clang__) || defined(__apple_build_version__) | |
| # pragma clang diagnostic push | |
| # pragma clang diagnostic ignored "-Wdeprecated-declarations" |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pragma directive #pragma GCC diagnostic warning "-Wdeprecated-declarations" will cause deprecation warnings to be emitted as warnings for GCC, which contradicts the intent of suppressing these internal implementation warnings. This should be #pragma GCC diagnostic ignored "-Wdeprecated-declarations" to suppress the warnings like it was before, matching the behavior for MSVC which uses disable : 4996.
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pragma directive #pragma clang diagnostic warning "-Wdeprecated-declarations" will cause deprecation warnings to be emitted as warnings for Clang, which contradicts the intent of suppressing these internal implementation warnings. This should be #pragma clang diagnostic ignored "-Wdeprecated-declarations" to suppress the warnings like it was before, matching the behavior for MSVC which uses disable : 4996.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pragma directive
#pragma GCC diagnostic warning "-Wdeprecated-declarations"will cause deprecation warnings to be emitted as warnings for GCC, which contradicts the intent of suppressing these internal implementation warnings. This should be#pragma GCC diagnostic ignored "-Wdeprecated-declarations"to suppress the warnings like it was before, matching the behavior for MSVC which usesdisable : 4996.