[test] new g++ compilation warnings on trunk

Compiling against the boost trunk I'm getting hundreds of these: g++ -Wall -Wextra -Wno-missing-braces -g -ftrapv -DBOOST_1_36_0 -Iboost-1_37 -MMD -MP -DUSE_TRAPV -c -o src/test/BlobTest.o src/test/BlobTest.cpp boost/test/floating_point_comparison.hpp:224: warning: 'boost::test_tools::<unnamed>::check_is_close' defined but not used boost/test/floating_point_comparison.hpp:246: warning: 'boost::test_tools::<unnamed>::check_is_small' defined but not used Any chance we can fix this? If you need a tester for g++ 4.2.3, I can do it. Thanks, -- Robert

AMDG Robert Mecklenburg wrote:
Compiling against the boost trunk I'm getting hundreds of these:
g++ -Wall -Wextra -Wno-missing-braces -g -ftrapv -DBOOST_1_36_0 -Iboost-1_37 -MMD -MP -DUSE_TRAPV -c -o src/test/BlobTest.o src/test/BlobTest.cpp boost/test/floating_point_comparison.hpp:224: warning: 'boost::test_tools::<unnamed>::check_is_close' defined but not used boost/test/floating_point_comparison.hpp:246: warning: 'boost::test_tools::<unnamed>::check_is_small' defined but not used
Any chance we can fix this? If you need a tester for g++ 4.2.3, I can do it.
The usual trick for avoiding ODR violations seems to work. class X {}; template<class T> struct static_ { static T value; }; template<class T> T static_<T>::value; namespace { const X& x = static_<X>::value; } int main() { } In Christ, Steven Watanabe

Hi Steven ! On Monday 13 October 2008 22:42:28 Steven Watanabe wrote:
Robert Mecklenburg wrote:
Compiling against the boost trunk I'm getting hundreds of these: Any chance we can fix this? If you need a tester for g++ 4.2.3, I can do it.
The usual trick for avoiding ODR violations seems to work.
Yes, patched locally. Do we have a tool/detail/common header for this trick ? Duplications of this logic by c&p seems not a good idea to me... Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !

On Mon, Oct 13, 2008 at 12:42 PM, Steven Watanabe
AMDG
Robert Mecklenburg wrote:
Compiling against the boost trunk I'm getting hundreds of these:
g++ -Wall -Wextra -Wno-missing-braces -g -ftrapv -DBOOST_1_36_0 -Iboost-1_37 -MMD -MP -DUSE_TRAPV -c -o src/test/BlobTest.o src/test/BlobTest.cpp boost/test/floating_point_comparison.hpp:224: warning: 'boost::test_tools::<unnamed>::check_is_close' defined but not used boost/test/floating_point_comparison.hpp:246: warning: 'boost::test_tools::<unnamed>::check_is_small' defined but not used
Any chance we can fix this? If you need a tester for g++ 4.2.3, I can do it.
The usual trick for avoiding ODR violations seems to work.
class X {};
template<class T> struct static_ { static T value; };
template<class T> T static_<T>::value;
namespace { const X& x = static_<X>::value; }
int main() { }
In Christ, Steven Watanabe
This trick seemed to work at first, but then when I ran the 1.37.0 test tests I got: ..\..\libs\test\example\unit_test_example_10.cpp(75) : error C2039: 'check_is_close' : is not a member of 'boost::test_tools' ..\..\libs\test\example\unit_test_example_10.cpp(75) : error C2065: 'check_is_close' : undeclared identifier Other ideas? I need to patch 1.37.0 to kill these warnings. Thanks, Mat

Hi Mat ! On Wednesday 05 November 2008 19:20:37 Mat Marcus wrote:
On Mon, Oct 13, 2008 at 12:42 PM, Steven Watanabe
This trick seemed to work at first, but then when I ran the 1.37.0 test tests I got: ..\..\libs\test\example\unit_test_example_10.cpp(75) : error C2039: 'check_is_close' : is not a member of 'boost::test_tools' ..\..\libs\test\example\unit_test_example_10.cpp(75) : error C2065: 'check_is_close' : undeclared identifier
Did you try my patch as described in #2390 ? https://svn.boost.org/trac/boost/ticket/2390#comment:1 All tests pass for me on gcc-4.2 (Kubuntu) and gcc-4.3 (SuSE-11.0)
Other ideas? I need to patch 1.37.0 to kill these warnings.
I've only tested trunk, because Boost.Test has been merged (everything ?) Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !

Juergen Hunold
On Wednesday 05 November 2008 19:20:37 Mat Marcus wrote:
On Mon, Oct 13, 2008 at 12:42 PM, Steven Watanabe
This trick seemed to work at first, but then when I ran the 1.37.0 test tests I got: ..\..\libs\test\example\unit_test_example_10.cpp(75) : error C2039: 'check_is_close' : is not a member of 'boost::test_tools' ..\..\libs\test\example\unit_test_example_10.cpp(75) : error C2065: 'check_is_close' : undeclared identifier
Did you try my patch as described in #2390 ?
I've checked in patch along the line of what you proposed. Let's see if anything breaks. Gennadiy
participants (5)
-
Gennadiy Rozental
-
Juergen Hunold
-
Mat Marcus
-
Robert Mecklenburg
-
Steven Watanabe