-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New warnings with Clang10 #2225
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
Comments
I can confirm that this problem happens and that the proposed solution silences the warning Thanks |
I can't reproduce this "just by using clang++ 10 and -Wunused-value". Can someone provide actual code that triggers this warning? As far as I can see, the solution would be to just slap |
@bstaletic Mhm, good question; I have uploaded https://github.com/apollo13/pybind11-example which triggers the issue for me. Ie just execute
|
Note that I am on Fedora 32, executing the
If you have the same "default" flags the issue should be reproducible. |
Adding |
I think that is fine. Mind submitting a pull request? |
Merged #2225. Thanks again! :-) |
Uh oh!
There was an error while loading. Please reload this page.
Issue description
After upgrading to Clang10 I see new warnings (which result in errors due to
-Werror
) on my builds with pybind11 2.5.0:Reproducible example code
As far as I can see this would happen for every usage of
class_
and should immediately show up as soon as Clang10 is used and-Wunused-value
is enabled. I was able to locally disable it via:The text was updated successfully, but these errors were encountered: