Opened 8 years ago

Closed 7 years ago

#9965 closed Bugs (invalid)

execution_monitor.ipp causes compilation failure

Reported by: chris.cooper@… Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

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.

Change History (3)

comment:1 by viboes, 8 years ago

Component: Nonetest
Description: modified (diff)
Owner: set to Gennadiy Rozental

comment:2 by Raffi Enficiaud, 8 years ago

Hi,

Why would MSVC treat warnings as errors?

comment:3 by Raffi Enficiaud, 7 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.