Hi,
I am writing my first boost program and having trouble with the compiler warning against boost 1.44.0.
Is there any way to get rid of those warnings so I can focus on real warnings in my code ?
The gist of warning is :
boost_1_44_0/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: warning: the result of the conversion is unspecified because '-0x00000000000000001' is outside the range of type 'boost::numeric::udt_builtin_mixture_enum' [-Wconversion]
Any help or pointers are appreciated.
Neeraj
====== The following program is a cut down version of my code, just declares sregex
#include <iostream>
#include
int main (int _argc, const char** _argv)
{
std::cout << "argc=" << _argc << " argv=" << _argv << std::endl;
using namespace boost::xpressive;
std::string keyword("");
sregex const re(sregex::compile(keyword, sregex::icase));
}
====== The following cmd is used to build it (tried g++ v 4.4.5 and 4.6 with same results)
g++ -ftemplate-depth-128 -O0 -fno-inline -Wall -g -Wconversion -Wno-strict-aliasing -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-array-bounds -Wno-ignored-qualifiers -Wno-parentheses -Wno-strict-aliasing -fPIC -DBOOST_ALL_NO_LIB -I/work/loc1/atddds -I/work/loc1/boost_1_44_0/include -Iinclude -c -o boost_regex_test.o boost_regex_test.cpp
====== The following cmd is used to build it (tried g++ v 4.4.5 and 4.6)
g++ -ftemplate-depth-128 -O0 -fno-inline -Wall -g -Wconversion -Wno-strict-aliasing -Wextra -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-array-bounds -Wno-ignored-qualifiers -Wno-parentheses -Wno-strict-aliasing -fPIC -DBOOST_ALL_NO_LIB -I/work/loc1/atddds -I/work/loc1/boost_1_44_0/include -Iinclude -c -o boost_regex_test.o boost_regex_test.cpp
In file included from /work/loc1/boost_1_44_0/include/boost/mpl/integral_c.hpp:32:0,
from /work/loc1/boost_1_44_0/include/boost/type_traits/integral_constant.hpp:11,
from /work/loc1/boost_1_44_0/include/boost/type_traits/detail/bool_trait_def.hpp:15,
from /work/loc1/boost_1_44_0/include/boost/type_traits/is_volatile.hpp:40,
from /work/loc1/boost_1_44_0/include/boost/type_traits/remove_const.hpp:14,
from /work/loc1/boost_1_44_0/include/boost/proto/proto_fwd.hpp:25,
from /work/loc1/boost_1_44_0/include/boost/xpressive/xpressive_fwd.hpp:53,
from /work/loc1/boost_1_44_0/include/boost/xpressive/detail/detail_fwd.hpp:24,
from /work/loc1/boost_1_44_0/include/boost/xpressive/regex_primitives.hpp:21,
from /work/loc1/boost_1_44_0/include/boost/xpressive/xpressive_static.hpp:24,
from /work/loc1/boost_1_44_0/include/boost/xpressive/xpressive.hpp:18,
from boost_regex_test.cpp:2:
/work/loc1/boost_1_44_0/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of 'mpl_::integral_c':
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/meta.hpp:30:13: instantiated from 'boost::numeric::convdetail::equal_to, mpl_::integral_c >'
/work/loc1/boost_1_44_0/include/boost/mpl/if.hpp:67:11: instantiated from 'boost::mpl::if_, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::eval_if, mpl_::integral_c >, boost::mpl::identity > >, boost::mpl::if_, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::identity > > > >'
/work/loc1/boost_1_44_0/include/boost/mpl/eval_if.hpp:37:41: instantiated from 'boost::mpl::eval_if, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::eval_if, mpl_::integral_c >, boost::mpl::identity > >, boost::mpl::if_, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::identity > > > >'
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/meta.hpp:82:9: instantiated from 'boost::numeric::convdetail::ct_switch4, mpl_::integral_c, mpl_::integral_c, mpl_::integral_c, boost::numeric::convdetail::get_subranged_BuiltIn2BuiltIn, boost::mpl::identity >, boost::mpl::identity >, boost::mpl::identity > >'
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp:45:9: instantiated from 'boost::numeric::convdetail::for_udt_builtin_mixture, boost::numeric::convdetail::get_subranged_BuiltIn2BuiltIn, boost::mpl::identity >, boost::mpl::identity >, boost::mpl::identity > >'
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/is_subranged.hpp:206:11: [ skipping 9 instantiation contexts ]
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:281:13: instantiated from 'boost::xpressive::detail::sequence<BidiIter> boost::xpressive::regex_compiler::parse_alternates(FwdIter&, FwdIter) [with FwdIter = __gnu_cxx::__normal_iterator, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >]'
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:212:75: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler::compile_(FwdIter, FwdIter, boost::xpressive::regex_compiler::flag_type, std::forward_iterator_tag) [with FwdIter = __gnu_cxx::__normal_iterator, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >, boost::xpressive::regex_compiler::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:120:60: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler::compile(InputIter, InputIter, boost::xpressive::regex_compiler::flag_type) [with InputIter = __gnu_cxx::__normal_iterator, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >, boost::xpressive::regex_compiler::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:129:71: instantiated from 'typename boost::disable_if::type boost::xpressive::regex_compiler::compile(const InputRange&, boost::xpressive::regex_compiler::flag_type) [with InputRange = std::basic_string<char>, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >, typename boost::disable_if::type = boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator >, boost::xpressive::regex_compiler::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
/work/loc1/boost_1_44_0/include/boost/xpressive/basic_regex.hpp:193:61: instantiated from 'static boost::xpressive::basic_regex<BidiIter> boost::xpressive::basic_regex<BidiIter>::compile(const InputRange&, boost::xpressive::basic_regex<BidiIter>::flag_type) [with InputRange = std::basic_string<char>, BidiIter = __gnu_cxx::__normal_iterator, boost::xpressive::basic_regex<BidiIter>::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
boost_regex_test.cpp:9:57: instantiated from here
/work/loc1/boost_1_44_0/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: warning: the result of the conversion is unspecified because '-0x00000000000000001' is outside the range of type 'boost::numeric::udt_builtin_mixture_enum' [-Wconversion]
/work/loc1/boost_1_44_0/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of 'mpl_::integral_c':
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/meta.hpp:30:13: instantiated from 'boost::numeric::convdetail::equal_to, mpl_::integral_c >'
/work/loc1/boost_1_44_0/include/boost/mpl/if.hpp:67:11: instantiated from 'boost::mpl::if_, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::eval_if, mpl_::integral_c >, boost::mpl::identity > >, boost::mpl::if_, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::identity > > > >'
/work/loc1/boost_1_44_0/include/boost/mpl/eval_if.hpp:37:41: instantiated from 'boost::mpl::eval_if, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::eval_if, mpl_::integral_c >, boost::mpl::identity > >, boost::mpl::if_, mpl_::integral_c >, boost::mpl::identity >, boost::mpl::identity > > > >'
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/meta.hpp:82:9: instantiated from 'boost::numeric::convdetail::ct_switch4, mpl_::integral_c, mpl_::integral_c, mpl_::integral_c, boost::numeric::convdetail::get_subranged_Int2Int, boost::mpl::identity >, boost::mpl::identity >, boost::mpl::identity > >'
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/int_float_mixture.hpp:63:9: instantiated from 'boost::numeric::convdetail::for_int_float_mixture, boost::numeric::convdetail::get_subranged_Int2Int, boost::mpl::identity >, boost::mpl::identity >, boost::mpl::identity > >'
/work/loc1/boost_1_44_0/include/boost/numeric/conversion/detail/is_subranged.hpp:184:35: [ skipping 10 instantiation contexts ]
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:281:13: instantiated from 'boost::xpressive::detail::sequence<BidiIter> boost::xpressive::regex_compiler::parse_alternates(FwdIter&, FwdIter) [with FwdIter = __gnu_cxx::__normal_iterator, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >]'
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:212:75: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler::compile_(FwdIter, FwdIter, boost::xpressive::regex_compiler::flag_type, std::forward_iterator_tag) [with FwdIter = __gnu_cxx::__normal_iterator, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >, boost::xpressive::regex_compiler::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:120:60: instantiated from 'boost::xpressive::basic_regex<BidiIter> boost::xpressive::regex_compiler::compile(InputIter, InputIter, boost::xpressive::regex_compiler::flag_type) [with InputIter = __gnu_cxx::__normal_iterator, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >, boost::xpressive::regex_compiler::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
/work/loc1/boost_1_44_0/include/boost/xpressive/regex_compiler.hpp:129:71: instantiated from 'typename boost::disable_if::type boost::xpressive::regex_compiler::compile(const InputRange&, boost::xpressive::regex_compiler::flag_type) [with InputRange = std::basic_string<char>, BidiIter = __gnu_cxx::__normal_iterator, RegexTraits = boost::xpressive::regex_traits, CompilerTraits = boost::xpressive::compiler_traits >, typename boost::disable_if::type = boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator >, boost::xpressive::regex_compiler::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
/work/loc1/boost_1_44_0/include/boost/xpressive/basic_regex.hpp:193:61: instantiated from 'static boost::xpressive::basic_regex<BidiIter> boost::xpressive::basic_regex<BidiIter>::compile(const InputRange&, boost::xpressive::basic_regex<BidiIter>::flag_type) [with InputRange = std::basic_string<char>, BidiIter = __gnu_cxx::__normal_iterator, boost::xpressive::basic_regex<BidiIter>::flag_type = boost::xpressive::regex_constants::syntax_option_type]'
boost_regex_test.cpp:9:57: instantiated from here
/work/loc1/boost_1_44_0/include/boost/mpl/aux_/integral_wrapper.hpp:73:96: warning: the result of the conversion is unspecified because '-0x00000000000000001' is outside the range of type 'boost::numeric::int_float_mixture_enum' [-Wconversion]