Skip to content
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

Add macro to disable MSVC has_denorm deprecation warning #574

Closed
wants to merge 1 commit into from

Conversation

mborland
Copy link
Member

@mborland mborland commented Dec 6, 2023

Closes: #573

@jzmaddock
Copy link
Collaborator

Are we between a rock and a hard place here? The problem with _SILENCE_CXX23_DENORM_DEPRECATION_WARNING is that it changes the std lib header and silences the warning everywhere including in user code. We may also eventually have this issue with other std lib's as well.

I wonder what the correct thing to do is here, members like has_denorm is still required to be present in C++23 but is "a candidate for removal" in a later std. So we do need to define those members even in C++23 :( I wonder if there any #pragma warning(disable:XXXX) that would work in this case?

@mborland
Copy link
Member Author

mborland commented Dec 7, 2023

Are we between a rock and a hard place here? The problem with _SILENCE_CXX23_DENORM_DEPRECATION_WARNING is that it changes the std lib header and silences the warning everywhere including in user code. We may also eventually have this issue with other std lib's as well.

I wonder what the correct thing to do is here, members like has_denorm is still required to be present in C++23 but is "a candidate for removal" in a later std. So we do need to define those members even in C++23 :( I wonder if there any #pragma warning(disable:XXXX) that would work in this case?

We are between a rock and a hard place. I tried disabling the warning, and it still propagates: https://godbolt.org/z/bz1a54jf7

@jzmaddock
Copy link
Collaborator

Shucks :(

The macro doesn't work either if has already been included: https://godbolt.org/z/r6Pdn71We

@jzmaddock
Copy link
Collaborator

The #pragma does seem to work in some situations and not others... will experiment.

@jzmaddock
Copy link
Collaborator

This seems to get it: #575

@jzmaddock jzmaddock closed this Dec 8, 2023
@mborland mborland deleted the 573 branch December 19, 2023 09:12
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.

std::has_denorm/std::has_denorm_loss are deprecated in c++23
2 participants