Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12362: Default case handling in exception_ptr missing clue for coverity to treat switch fall-through as intentional
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-07-29 23:13:22
#12362: Default case handling in exception_ptr missing clue for coverity to treat
switch fall-through as intentional
----------------------------------------------+----------------------------
Reporter: James E. King, III <jim.king@â¦> | Owner: emildotchevski
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: exception
Version: Boost 1.54.0 | Severity: Cosmetic
Resolution: invalid | Keywords:
----------------------------------------------+----------------------------
Changes (by emildotchevski):
* status: new => closed
* resolution: => invalid
Old description:
> In exception_ptr.hpp lines 322 to 325:
>
> {{{
> default:
> BOOST_ASSERT(0);
> case exception_detail::clone_current_exception_result::
> not_supported:
> }}}
>
> Coverity complains about the fall-through.
> Changing it to the following will resolve this and make intentions
> clearer:
>
> {{{
> default:
> BOOST_ASSERT(0);
> // fall through
> case exception_detail::clone_current_exception_result::
> not_supported:
> }}}
>
> This is present in the development trunk and goes back to at least 1.54.
New description:
This is not fall through but undefined behavior as indicated by the use of
BOOST_ASSERT. Adding the fall through comment is incorrect and would be
misleading.
-- -- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12362#comment:1> 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