Re: [Boost-bugs] [Boost C++ Libraries] #6074: warnings-as-errors not usable with Boost.test in release mode

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6074: warnings-as-errors not usable with Boost.test in release mode
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-04 18:01:29


#6074: warnings-as-errors not usable with Boost.test in release mode
--------------------------------------+-------------------------------------
  Reporter: pbristow | Owner: rogeeff
      Type: Support Requests | Status: closed
 Milestone: To Be Determined | Component: test
   Version: Boost Development Trunk | Severity: Optimization
Resolution: fixed | Keywords: boost test warnings-as-errors
--------------------------------------+-------------------------------------

Comment (by Valentin Shtronda <valiko.ua@…>):

 Hi rogeeff,

 I checked out trunk and still see the following warnings when building
 release in VS2012 (original reporter talked about VS2010):

 {{{
 boost\test\utils\named_params.hpp(75): warning C4702: unreachable code
 boost\test\utils\named_params.hpp(79): warning C4702: unreachable code
 boost\test\utils\named_params.hpp(87): warning C4702: unreachable code
 }}}

 I got rid of them by removing the code after throwing exception (not sure
 if it's OK for other compilers):

 Against trunk revision 81197:
 {{{
 line 75: { report_access_to_invalid_parameter(true); /*static T* v = 0;
 return *v;*/ }
 line 79: { report_access_to_invalid_parameter(true); /*static typename
 remove_reference<T>::type* v = 0; return *v;*/ }
 line 83: { report_access_to_invalid_parameter(true); /*return nil();*/ }
 line 87: { report_access_to_invalid_parameter(true); /*return nil();*/ }
 line 91: { report_access_to_invalid_parameter(true); /*return nil();*/ }
 }}}

 Against boost 1.53:
 {{{
 line 74: { report_access_to_invalid_parameter(); /*static T* v = 0; return
 *v;*/ }
 line 78: { report_access_to_invalid_parameter(); /*static typename
 remove_reference<T>::type* v = 0; return *v;*/ }
 line 82: { report_access_to_invalid_parameter(); /*return nil();*/ }
 line 86: { report_access_to_invalid_parameter(); /*return nil();*/ }
 line 90: { report_access_to_invalid_parameter(); /*return nil();*/ }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6074#comment:2>
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:12 UTC