Boost logo

Boost :

Subject: [boost] [function] Placement new warnings from gcc 6
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2016-04-01 04:11:47


Hi,

In my tests on gcc 6 I'm seeing these warnings which stem from
Boost.Function:

../boost/function/function_template.hpp:572:11: warning: placement new
constructing an object of type
'boost::spirit::qi::detail::parser_binder<boost::spirit::qi::sequence<boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned
int, 10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>, boost::fusion::nil_> > > > > > > >, mpl_::bool_<false> >'
and size '8' in a region of type 'char' and size '1' [-Wplacement-new=]
../boost/function/function_base.hpp:308:13: warning: placement new
constructing an object of type
'boost::detail::function::functor_manager_common<boost::spirit::qi::detail::parser_binder<boost::spirit::qi::sequence<boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned
int, 10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>, boost::fusion::nil_> > > > > > > >, mpl_::bool_<false> >
>::functor_type {aka
boost::spirit::qi::detail::parser_binder<boost::spirit::qi::sequence<boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned
int, 10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>,
boost::fusion::cons<boost::spirit::qi::literal_char<boost::spirit::char_encoding::standard,
true, false>,
boost::fusion::cons<boost::spirit::qi::any_uint_parser<unsigned int,
10u, 1u, -1>, boost::fusion::nil_> > > > > > > >, mpl_::bool_<false> >}'
and size '8' in a region of type 'char' and size '1' [-Wplacement-new=]

I'm not familiar with boost::function internals, but the warning looks
serious enough to do something about it. I.e. if it's actually benign,
it would be nice to silence it to avoid causing panic.


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