Boost C++ Libraries: Ticket #3758: Using Boost Testing Framework from Boost.build Jamfile generates warning about "long long integer constant" with gcc 4.2.2 https://svn.boost.org/trac10/ticket/3758 <p> Hello everyone, </p> <p> I'm using Boost.Build to automate testing. The Jamfile.v2 is as follow </p> <pre class="wiki">import testing ; use-project /boost : /path/to/boost ; path-constant INCLUDE_PATH : path/to/include ; path-constant SOURCE_PATH : $(INCLUDE_PATH) ; project : requirements &lt;define&gt;BOOST_TEST_MAIN &lt;threading&gt;multi &lt;include&gt;$(INCLUDE_PATH) ; alias dependencies : /boost//unit_test_framework [ glob $(SOURCE_PATH)/*.cpp ] ; run main.cpp dependencies ; </pre><p> so invoking /boost<em>unit_test_framework refers to boost unit testing framework's project. </em></p> <p> My test passes but while compiling the unit_test_framework libraries it generates the following warning ( gcc 4.4.2 ) </p> <pre class="wiki"> "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -pedantic -g -pthread -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_TEST_DYN_LINK=1 -I"/home/gchatelet/boost" -c -o "/home/gchatelet/boost/bin.v2/libs/test/build/gcc-4.4.2/debug/threading-multi/interaction_based.o" "/home/gchatelet/boost/libs/test/src/interaction_based.cpp" In file included from /home/gchatelet/boost/boost/detail/lcast_precision.hpp:16, from /home/gchatelet/boost/boost/lexical_cast.hpp:31, from /home/gchatelet/boost/boost/test/interaction_based.hpp:27, from /home/gchatelet/boost/boost/test/impl/interaction_based.ipp:26, from /home/gchatelet/boost/libs/test/src/interaction_based.cpp:16: /home/gchatelet/boost/boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant /home/gchatelet/boost/boost/integer_traits.hpp:164:77: warning: use of C99 long long integer constant /home/gchatelet/boost/boost/integer_traits.hpp:170:70: warning: use of C99 long long integer constant /home/gchatelet/boost/boost/integer_traits.hpp:170:70: warning: use of C99 long long integer constant </pre><p> looking at the tests of boost unit testing framework "boost/libs/test/test/Jamfile.v2" I noticed it was already corrected in the tests but not in the build. </p> <pre class="wiki">rule test-btl-lib ( test-rule : test-name : lib-name ? : pattern_file * : source_files * : extra-libs ? ) { source_files ?= $(test-name).cpp ; return [ $(test-rule) $(source_files) ../build//$(lib-name) $(extra-libs) : #args : $(pattern_file) : #&lt;stlport-iostream&gt;on # Activating -pedantic finds more gotchas # Unfortunately, this warns about the use of "long long" in gcc's own stdlib # So deactivate those warnings again &lt;toolset&gt;gcc:&lt;cxxflags&gt;-pedantic &lt;toolset&gt;gcc:&lt;cxxflags&gt;-Wno-long-long &lt;toolset&gt;borland:&lt;cxxflags&gt;-w-8080 &lt;toolset&gt;msvc-6.5:&lt;link&gt;static &lt;toolset&gt;msvc-8.0:&lt;define&gt;_SCL_SECURE_NO_DEPRECATE &lt;warnings&gt;all : $(test-name) ] ; } </pre><p> It seems my test project triggers the -pedantic flag and then gcc complains about "long long". </p> <p> I'd like to activate the &lt;warning-as-errors&gt; flag for my whole project and this warning about "long long" prevents me to do so. </p> <p> Can you consider my patch to apply the same workaround as for tests ? </p> <p> Best regards, Guillaume </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3758 Trac 1.4.3 Guillaume Chatelet <chatelet.guillaume@…> Sat, 12 Dec 2009 17:24:15 GMT attachment set https://svn.boost.org/trac10/ticket/3758 https://svn.boost.org/trac10/ticket/3758 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost.patch</span> </li> </ul> <p> The actual patch </p> Ticket Steven Watanabe Fri, 11 Jun 2010 15:25:22 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3758#comment:1 https://svn.boost.org/trac10/ticket/3758#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This has been fixed in integer_traits.hpp. </p> Ticket