Boost logo

Boost :

Subject: [boost] [serialization] bug in static_warning.hpp
From: Alain Miniussi (alain.miniussi_at_[hidden])
Date: 2015-09-21 10:36:48


Hi,

In static_warning.hpp we have the following code (which, if I trust its name, should trigger a *warning*):

#define BOOST_SERIALIZATION_BSW(B, L) \
     typedef boost::serialization::BOOST_SERIALIZATION_SS< \
         sizeof( boost::serialization::static_warning_test< B, L > ) \
> BOOST_JOIN(STATIC_WARNING_LINE, L) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE;
#define BOOST_STATIC_WARNING(B) BOOST_SERIALIZATION_BSW(B, __LINE__)

Now, since, since there is no BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE defined in boost (there used to be one in static_assert.hpp) this thing will generate a typedef of the form:

typedef boost::serialization::BOOST_SERIALIZATION_SS< \
      sizeof( boost::serialization::static_warning_test< B, L > ) \
> $STATIC_WARNING_LINE$L BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE;

which is wrong.

The MPI test are failing on that.

Maybe BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE should be replaced with BOOST_ATTRIBUTE_UNUSED, but I am not sure what that macro is trying to achieve.

Thks

Alain


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk