Re: [Boost-bugs] [Boost C++ Libraries] #9965: execution_monitor.ipp causes compilation failure

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9965: execution_monitor.ipp causes compilation failure
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-05-18 18:45:40


#9965: execution_monitor.ipp causes compilation failure
-------------------------------+---------------------
  Reporter: chris.cooper@… | Owner: rogeeff
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: test
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------
Changes (by viboes):

 * owner: => rogeeff
 * component: None => test


Old description:

> test\impl\execution_monitor.ipp causes compilation failures from MSVC
> 10.0 because of this function:
>
> int BOOST_TEST_CALL_DECL
> assert_reporting_function( int reportType, char* userMessage, int* )
> {
> switch( reportType ) {
> case BOOST_TEST_CRT_ASSERT:
> detail::report_error( execution_exception::user_error,
> userMessage );
>
> return 1; // return value and retVal are not important since we
> never reach this line
> case BOOST_TEST_CRT_ERROR:
> detail::report_error( execution_exception::system_error,
> userMessage );
>
> return 1; // return value and retVal are not important since we
> never reach this line
> default:
> return 0; // use usual reporting method
> }
> } // assert_reporting_function
>
> The MSVC compiler gives a warning that there is unreachable code (the
> lines that say "return 1;") and then because it has been told to treat
> warnings as errors, the compilation fails.

New description:

 test\impl\execution_monitor.ipp causes compilation failures from MSVC 10.0
 because of this function:


 {{{
 int BOOST_TEST_CALL_DECL
 assert_reporting_function( int reportType, char* userMessage, int* )
 {
     switch( reportType ) {
     case BOOST_TEST_CRT_ASSERT:
         detail::report_error( execution_exception::user_error, userMessage
 );

         return 1; // return value and retVal are not important since we
 never reach this line
     case BOOST_TEST_CRT_ERROR:
         detail::report_error( execution_exception::system_error,
 userMessage );

         return 1; // return value and retVal are not important since we
 never reach this line
     default:
         return 0; // use usual reporting method
     }
 } // assert_reporting_function

 }}}

 The MSVC compiler gives a warning that there is unreachable code (the
 lines that say "return 1;") and then because it has been told to treat
 warnings as errors, the compilation fails.

--
-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9965#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:16 UTC