Subject: [Boost-bugs] [Boost C++ Libraries] #3758: Using Boost Testing Framework from Boost.build Jamfile generates warning about "long long integer constant" with gcc 4.2.2
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-12-12 17:23:49
#3758: Using Boost Testing Framework from Boost.build Jamfile generates warning
about "long long integer constant" with gcc 4.2.2
---------------------------------------------------------------+------------
Reporter: Guillaume Chatelet <chatelet.guillaume@â¦> | Owner: rogeeff
Type: Patches | Status: new
Milestone: Boost 1.42.0 | Component: test
Version: Boost 1.41.0 | Severity: Cosmetic
Keywords: |
---------------------------------------------------------------+------------
Hello everyone,
I'm using Boost.Build to automate testing. The Jamfile.v2 is as follow
{{{
import testing ;
use-project /boost : /path/to/boost ;
path-constant INCLUDE_PATH : path/to/include ;
path-constant SOURCE_PATH : $(INCLUDE_PATH) ;
project
: requirements <define>BOOST_TEST_MAIN
<threading>multi
<include>$(INCLUDE_PATH)
;
alias dependencies
:
/boost//unit_test_framework
[ glob $(SOURCE_PATH)/*.cpp ]
;
run main.cpp dependencies ;
}}}
so invoking /boost//unit_test_framework refers to boost unit testing
framework's project.
My test passes but while compiling the unit_test_framework libraries it
generates the following warning ( gcc 4.4.2 )
{{{
"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
}}}
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.
{{{
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)
: #<stlport-iostream>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
<toolset>gcc:<cxxflags>-pedantic
<toolset>gcc:<cxxflags>-Wno-long-long
<toolset>borland:<cxxflags>-w-8080
<toolset>msvc-6.5:<link>static
<toolset>msvc-8.0:<define>_SCL_SECURE_NO_DEPRECATE
<warnings>all
: $(test-name)
] ;
}
}}}
It seems my test project triggers the -pedantic flag and then gcc
complains about "long long".
I'd like to activate the <warning-as-errors> flag for my whole project and
this warning about "long long" prevents me to do so.
Can you consider my patch to apply the same workaround as for tests ?
Best regards,
Guillaume
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3758> 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:02 UTC