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

Warning whe compiling with -Wundef on clang #186

Closed
viboes opened this issue Sep 9, 2017 · 2 comments
Closed

Warning whe compiling with -Wundef on clang #186

viboes opened this issue Sep 9, 2017 · 2 comments

Comments

@viboes
Copy link
Contributor

viboes commented Sep 9, 2017

When compiling with -Wundef on clang we get the following warning

/xxx/modular-boost3/boost/type_traits/is_nothrow_move_constructible.hpp:30:79: warning: 'BOOST_GCC_VERSION_WORKAROUND_GUARD' is not defined, evaluates to 0 [-Werror,-Wundef]
#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
                                                                              ^
/Users/viboes/github/modular-boost3/boost/config/workaround.hpp:244:10: note: expanded from macro 'BOOST_WORKAROUND'
       ((symbol ## _WORKAROUND_GUARD + 0 == 0) &&     \
         ^
<scratch space>:222:1: note: expanded from here
BOOST_GCC_VERSION_WORKAROUND_GUARD
^

This is because BOOST_GCC_VERSION_WORKAROUND_GUARD is not defined and used in an expression.

The following fixes the issue.

#ifndef BOOST_GCC
#define BOOST_GCC_WORKAROUND_GUARD 1
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_GCC_WORKAROUND_GUARD 0
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 0
#endif
``
@eldiener
Copy link
Contributor

eldiener commented Oct 7, 2017

I have created a PR for this issue.

@jzmaddock
Copy link
Collaborator

Since we have a PR, I'm closing this issue.

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

3 participants