Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-09-03 08:56:51


In trying to be virtuous and test everything compiled in strict mode as I write
it, I am finding myself thwarted by BOOST minimal_test otherwise excellent test
system.

I aim to compile and test all my code with MSVC 7.1 in strict mode (option /Za -
no language extensions and warning level 4).

But in practice this is impossible using the minimal_test.cpp
because #include also compiles Windows specific structured exception handling
modules like winNT.h and these require MS extensions to compile - otherwise
zillions of errors.

It is possible to avoid this by compiling these modules separately with
extensions enabled, building a library, then to compile MY modules strictly, and
then linking to the library, but this is a bit more cumbersome than
minimal_testing.

This problem will also apply to all testing of Boost library items using the
minimal test if we try to raise the code quality bar to 'strict' compilation.

Is there any easier way round this so that minimal_test can be used without
linking with a library?

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]

PS The unit test modules (exception execution monitor) all compile in 'strict'
with the following warnings, if this is any help. Most look easily fixable or
ignorable, for example with

#ifdef _MSC_VER // or BOOST_MSVC?
#pragma warning (disable : 4511) // copy operator could not be generated
#pragma warning (disable : 4512) // assignment operator could not be generated
#endif // _MSC_VER

------ Rebuild All started: Project: unit_test, Configuration: Debug
Win32 ------

Deleting intermediate files and output files for project 'unit_test',
configuration 'Debug|Win32'.
Compiling...
execution_monitor.cpp
i:\boost_1_30_2\libs\test\src\execution_monitor.cpp(156) : warning C4100:
'retVal' : unreferenced formal parameter
i:\boost_1_30_2\libs\test\src\execution_monitor.cpp(186) : warning C4535:
calling _set_se_translator() requires /EHa
        the command line options /EHc and /GX are insufficient
Compiling...
unit_test_suite.cpp
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(64) : warning C4121:
'boost::unit_test_framework::detail::unit_test_monitor' : alignment of a member
was sensitive to packing
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(68) : warning C4512:
'boost::unit_test_framework::detail::unit_test_monitor' : assignment operator
could not be generated
        I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(34) : see
declaration of 'boost::unit_test_framework::detail::unit_test_monitor'
I:/boost_1_30_0\boost\test\unit_test_log.hpp(82) : warning C4512:
'boost::unit_test_framework::checkpoint' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\unit_test_log.hpp(78) : see declaration of
'boost::unit_test_framework::checkpoint'
unit_test_result.cpp
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(64) : warning C4121:
'boost::unit_test_framework::detail::unit_test_monitor' : alignment of a member
was sensitive to packing
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(68) : warning C4512:
'boost::unit_test_framework::detail::unit_test_monitor' : assignment operator
could not be generated
        I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(34) : see
declaration of 'boost::unit_test_framework::detail::unit_test_monitor'
i:\boost_1_30_2\libs\test\src\unit_test_result.cpp(85) : warning C4100:
'where_to' : unreferenced formal parameter
i:\boost_1_30_2\libs\test\src\unit_test_result.cpp(86) : warning C4100:
'where_to' : unreferenced formal parameter
i:\boost_1_30_2\libs\test\src\unit_test_result.cpp(214) : warning C4100:
'test_case_name' : unreferenced formal parameter
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\xutility(1244) :
warning C4172: returning address of local variable or temporary
        i:\boost_1_30_2\libs\test\src\unit_test_result.cpp(133) : see reference
to function template instantiation 'const _Ty
&std::max<boost::unit_test_framework::unit_test_counter>(const _Ty &,const _Ty
&)' being compiled
        with
        [
            _Ty=boost::unit_test_framework::unit_test_counter
        ]
unit_test_parameters.cpp
unit_test_monitor.cpp
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(64) : warning C4121:
'boost::unit_test_framework::detail::unit_test_monitor' : alignment of a member
was sensitive to packing
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(68) : warning C4512:
'boost::unit_test_framework::detail::unit_test_monitor' : assignment operator
could not be generated
        I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(34) : see
declaration of 'boost::unit_test_framework::detail::unit_test_monitor'
I:/boost_1_30_0\boost\test\unit_test_log.hpp(82) : warning C4512:
'boost::unit_test_framework::checkpoint' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\unit_test_log.hpp(78) : see declaration of
'boost::unit_test_framework::checkpoint'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4511:
'boost::wrap_stringstream' : copy constructor could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4512:
'boost::wrap_stringstream' : assignment operator could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4511:
'boost::test_toolbox::output_test_stream' : copy constructor could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4512:
'boost::test_toolbox::output_test_stream' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
unit_test_log.cpp
I:/boost_1_30_0\boost\test\unit_test_log.hpp(82) : warning C4512:
'boost::unit_test_framework::checkpoint' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\unit_test_log.hpp(78) : see declaration of
'boost::unit_test_framework::checkpoint'
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(64) : warning C4121:
'boost::unit_test_framework::detail::unit_test_monitor' : alignment of a member
was sensitive to packing
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(68) : warning C4512:
'boost::unit_test_framework::detail::unit_test_monitor' : assignment operator
could not be generated
        I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(34) : see
declaration of 'boost::unit_test_framework::detail::unit_test_monitor'
i:\boost_1_30_2\libs\test\src\unit_test_log.cpp(438) : warning C4100: 'output' :
unreferenced formal parameter
i:\boost_1_30_2\libs\test\src\unit_test_log.cpp(486) : warning C4100: 'output' :
unreferenced formal parameter
i:\boost_1_30_2\libs\test\src\unit_test_log.cpp(520) : warning C4100:
'test_cases_amount' : unreferenced formal parameter
i:\boost_1_30_2\libs\test\src\unit_test_log.cpp(520) : warning C4100: 'output' :
unreferenced formal parameter
test_tools.cpp
I:/boost_1_30_0\boost\test\unit_test_log.hpp(82) : warning C4512:
'boost::unit_test_framework::checkpoint' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\unit_test_log.hpp(78) : see declaration of
'boost::unit_test_framework::checkpoint'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4511:
'boost::wrap_stringstream' : copy constructor could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4512:
'boost::wrap_stringstream' : assignment operator could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4511:
'boost::test_toolbox::output_test_stream' : copy constructor could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4512:
'boost::test_toolbox::output_test_stream' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
i:\boost_1_30_2\libs\test\src\test_tools.cpp(203) : warning C4511:
'boost::test_toolbox::output_test_stream::Impl' : copy constructor could not be
generated
        i:\boost_1_30_2\libs\test\src\test_tools.cpp(193) : see declaration of
'boost::test_toolbox::output_test_stream::Impl'
i:\boost_1_30_2\libs\test\src\test_tools.cpp(203) : warning C4512:
'boost::test_toolbox::output_test_stream::Impl' : assignment operator could not
be generated
        i:\boost_1_30_2\libs\test\src\test_tools.cpp(193) : see declaration of
'boost::test_toolbox::output_test_stream::Impl'
Generating Code...
i:\boost_1_30_2\libs\test\src\unit_test_result.cpp(505) : warning C4701: local
variable 'rl' may be used without having been initialized
Compiling...
unit_test_main.cpp
I:/boost_1_30_0\boost\test\unit_test_log.hpp(82) : warning C4512:
'boost::unit_test_framework::checkpoint' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\unit_test_log.hpp(78) : see declaration of
'boost::unit_test_framework::checkpoint'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4511:
'boost::wrap_stringstream' : copy constructor could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4512:
'boost::wrap_stringstream' : assignment operator could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4511:
'boost::test_toolbox::output_test_stream' : copy constructor could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4512:
'boost::test_toolbox::output_test_stream' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(64) : warning C4121:
'boost::unit_test_framework::detail::unit_test_monitor' : alignment of a member
was sensitive to packing
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(68) : warning C4512:
'boost::unit_test_framework::detail::unit_test_monitor' : assignment operator
could not be generated
        I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(34) : see
declaration of 'boost::unit_test_framework::detail::unit_test_monitor'
test_unit_test.cpp
I:/boost_1_30_0\boost\test\unit_test_log.hpp(82) : warning C4512:
'boost::unit_test_framework::checkpoint' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\unit_test_log.hpp(78) : see declaration of
'boost::unit_test_framework::checkpoint'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4511:
'boost::wrap_stringstream' : copy constructor could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(50) : warning C4512:
'boost::wrap_stringstream' : assignment operator could not be generated
        I:/boost_1_30_0\boost\test\detail\wrap_stringstream.hpp(33) : see
declaration of 'boost::wrap_stringstream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4511:
'boost::test_toolbox::output_test_stream' : copy constructor could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
I:/boost_1_30_0\boost\test\test_tools.hpp(456) : warning C4512:
'boost::test_toolbox::output_test_stream' : assignment operator could not be
generated
        I:/boost_1_30_0\boost\test\test_tools.hpp(420) : see declaration of
'boost::test_toolbox::output_test_stream'
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(64) : warning C4121:
'boost::unit_test_framework::detail::unit_test_monitor' : alignment of a member
was sensitive to packing
I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(68) : warning C4512:
'boost::unit_test_framework::detail::unit_test_monitor' : assignment operator
could not be generated
        I:/boost_1_30_0\boost\test\detail\unit_test_monitor.hpp(34) : see
declaration of 'boost::unit_test_framework::detail::unit_test_monitor'
MSVC++ compiler Version 7.1
test_unit_test.cpp(38) : warning C4100: 'argv' : unreferenced formal parameter
test_unit_test.cpp(38) : warning C4100: 'argc' : unreferenced formal parameter
Generating Code...
Linking...

Build log was saved at "file://j:\Cpp\unit_test\Debug\BuildLog.htm"
unit_test - 0 error(s), 49 warning(s)

---------------------- Done ----------------------

    Rebuild All: 1 succeeded, 0 failed, 0 skipped


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk