[signals2][variant] inline warning with MSVC 2022
This may not be a new issue, as I'm trying to update a project from
Boost 1.68 to 1.80 (big jump!), but in trying to compile I'm being hit
with this lengthy warning (and this particular project is building with
warnings as errors, so this is problematic):
warning C4714: function 'class boost::variant
,struct boost::mpl::l_iter<struct boost::mpl::l_end> >,class boost::detail::variant::invoke_visitor
,void const *,struct boost::variant ::has_fallback_type_>(int,int,class boost::detail::variant::invoke_visitor &,void const *,struct boost::mpl::bool_<0>,struct boost::variant ::has_fallback_type_,struct boost::mpl::int_<0> *,struct boost::detail::variant::visitation_impl_step ,class boost::weak_ptr<class boost::signals2::detail::trackable_pointee>,struct boost::mpl::l_item ,class boost::weak_ptr<void>,struct boost::mpl::l_item ,class boost::signals2::detail::foreign_void_weak_ptr,struct boost::mpl::l_end> ,struct boost::mpl::l_iter<struct boost::mpl::l_end> > *)' marked as __forceinline not inlined
I'm not sure whether the Real Bug™ is in signals2 or in variant, but I don't think it's in any of my code since it doesn't name any of my types above that I can see. I tried the big stick of setting all of Boost to "external" (and set the external warning level to 0), but sadly this did not suppress the warning. Wrapping it in a #pragma suppression does hide the warning, which makes me sufficiently happy. But perhaps someone might be interested to poke at it?
On Mon, Sep 19, 2022 at 3:16 AM Gavin Lambert via Boost-users
,struct boost::mpl::l_iter<struct boost::mpl::l_end> > *)' marked as __forceinline not inlined
I'm not sure whether the Real Bug™ is in signals2 or in variant, but I don't think it's in any of my code since it doesn't name any of my types above that I can see.
The problem is not in signals2, as it makes no direct use of __forceinline. variant does make use of BOOST_FORCEINLINE so it probably needs to have the pragma suppression added somewhere. -- Frank
On Wed, Sep 21, 2022 at 12:21 PM Frank Mori Hess
On Mon, Sep 19, 2022 at 3:16 AM Gavin Lambert via Boost-users
wrote: ,struct boost::mpl::l_iter<struct boost::mpl::l_end> > *)' marked as __forceinline not inlined
I'm not sure whether the Real Bug™ is in signals2 or in variant, but I don't think it's in any of my code since it doesn't name any of my types above that I can see.
The problem is not in signals2, as it makes no direct use of __forceinline. variant does make use of BOOST_FORCEINLINE so it probably needs to have the pragma suppression added somewhere.
Actually, maybe the easiest thing would be to just put the pragma suppression in the header that defines BOOST_FORCEINLINE (config/detail/suffix.hpp). -- Frank
participants (2)
-
Frank Mori Hess
-
Gavin Lambert