[Boost-bugs] [Boost C++ Libraries] #12144: Clang 3.9 trunk DONT_USE_HAS_NEW_OPERATOR warning

Subject: [Boost-bugs] [Boost C++ Libraries] #12144: Clang 3.9 trunk DONT_USE_HAS_NEW_OPERATOR warning
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-04-21 19:02:13


#12144: Clang 3.9 trunk DONT_USE_HAS_NEW_OPERATOR warning
------------------------------+---------------------------
 Reporter: drivehappy@… | Owner: ramey
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
  Version: Boost 1.61.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------
 Clang 3.9 is reporting the following warning:

 {{{
 boost/boost.1.58.0/boost/archive/detail/iserializer.hpp:65:7: error: macro
 expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-
 to-defined]
 #if ! DONT_USE_HAS_NEW_OPERATOR
       ^
 boost/boost.1.58.0/boost/archive/detail/iserializer.hpp:61:5: note:
 expanded from macro 'DONT_USE_HAS_NEW_OPERATOR'
     defined(__BORLANDC__) \
     ^
 }}}

 I believe this may have been initially fixed with:
 https://svn.boost.org/trac/boost/ticket/8120

 Changing the source to not directly #define on #defined seems to resolve
 this warning:
 {{{
 #ifndef BOOST_MSVC
         #if BOOST_WORKAROUND(__IBMCPP__, < 1210) \
             || defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590)
                 #define DONT_USE_HAS_NEW_OPERATOR 1
         #else
                 #define DONT_USE_HAS_NEW_OPERATOR 0
         #endif
 #else
     #define DONT_USE_HAS_NEW_OPERATOR 0
 #endif
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12144>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC