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

warnings on clang-17.0.2 #313

Closed
andrewcorrigan opened this issue May 22, 2024 · 4 comments
Closed

warnings on clang-17.0.2 #313

andrewcorrigan opened this issue May 22, 2024 · 4 comments
Labels

Comments

@andrewcorrigan
Copy link
Contributor

My last PR, 312, fixed an error I was encountering using MSVC. Unfortunately, this is now triggering warnings on Clang. Would it make sense to add an #if guard and redo my last PR so that we only include the space for compilers that actually require it? This way, MSVC continues to compile and hopefully we could silence warnings from compilers that consider this deprecated?

/third_party/obake/mppp/include/mp++/detail/integer_literals.hpp:410:1: warning: identifier '_z1' preceded by whitespace in a literal operator declaration is deprecated [-Wdeprecated-literal-operator]
  410 | MPPP_DECLARE_INTEGRAL_UDL(1)
      | ^
@bluescarni
Copy link
Owner

Would it be possible instead to suppress the specific warning with a pragma or compiler flag for MSVC?

#ifdef-fing would certainly work, but I would like to avoid code repetition if possible.

@bluescarni
Copy link
Owner

@andrewcorrigan in #314 I restored the original code (i.e., before #312) for the user-defined literals.

I am not seeing any warnings/errors in the CI on MSVC 17.10.

I also think a the original issue might have been solved by MSVC turning this on by default:

https://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/preprocessor/preprocessor-experimental-overview.md

So perhaps it would make sense to turn on this flag in the mp++ build system...

In any case, let me know if you are still having issues. I plan on doing a dot release tomorrow, but I can always quickly do another one if we need to iterate on this.

Closing for the time being.

@andrewcorrigan
Copy link
Contributor Author

I'm really sorry I flaked on this. I'll try out the latest release and report back if there are any issues.

@bluescarni
Copy link
Owner

@andrewcorrigan no worries, let me know how it goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants