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

BOOST_ATTRIBUTE_NODISCARD triggers -Wpedantic on clang-6 #300

Closed
HDembinski opened this issue Oct 19, 2019 · 3 comments
Closed

BOOST_ATTRIBUTE_NODISCARD triggers -Wpedantic on clang-6 #300

HDembinski opened this issue Oct 19, 2019 · 3 comments

Comments

@HDembinski
Copy link
Contributor

HDembinski commented Oct 19, 2019

See issue on Godbolt

I am not quite sure what to do about this, there are several options. I think this is not our fault, clang is inconsistent here. My expectation is that when I compile with -std=c++14, a compiler should simply not accept the attribute. But clang-6 does accept it anyway which is why the configuration tests pick this up. However, when pedantic warnings are enabled, it warns about the usage.

So the general solution would be to run the configuration tests with -Wpedantic -Werror.

@HDembinski HDembinski changed the title BOOST_ATTRIBUTE_NOEXCEPT triggers -Wpedantic on clang-6 BOOST_ATTRIBUTE_NODISCARD triggers -Wpedantic on clang-6 Oct 19, 2019
@HDembinski
Copy link
Contributor Author

After looking into the code, I noticed that there is no configuration test for [[nodiscard]]. So this can be fixed in a simpler way. I will make a PR.

@jzmaddock
Copy link
Collaborator

Fixed in develop

@HDembinski
Copy link
Contributor Author

Cool, thanks!

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

No branches or pull requests

2 participants