Hi, when compiling the following code <snip> #include <boost/regex.hpp> #include <boost/regex/icu.hpp> int main() { return 0; } </snip> with g++ -Wall -Wextra, a bunch of warnings are produced, see below. The first two seem trivial to solve, but I don't know about the third. Is there a workaround to get rid of the warnings (other than to turn of the -Wall and -Wextra) and/or should I file a bug report? System information: Ubuntu 8.04, 64bit gcc 4.2.4 boost 1.36 Regards, Roland PS: Here are the warnings I get: g++ -Wall -Wextra test.cpp -c -I ~/include/ In file included from /home/rbock/include/boost/regex/icu.hpp:1015, from test.cpp:2: /home/rbock/include/boost/regex/v4/u32regex_token_iterator.hpp:286: warning: unused parameter ‘submatch’ /home/rbock/include/boost/regex/v4/u32regex_token_iterator.hpp:348: warning: unused parameter ‘submatch’ /home/rbock/include/boost/regex/v4/perl_matcher.hpp: In function ‘bool boost::re_detail::can_start(charT, const unsigned char*, unsigned char) [with charT = unsigned int]’: /home/rbock/include/boost/regex/v4/perl_matcher_common.hpp:787: instantiated from ‘bool boost::re_detail::perl_matcher<BidiIterator, Allocator, traits>::find_restart_any() [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/perl_matcher_common.hpp:245: instantiated from ‘bool boost::re_detail::perl_matcher<BidiIterator, Allocator, traits>::find_imp() [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/perl_matcher_common.hpp:229: instantiated from ‘bool boost::re_detail::perl_matcher<BidiIterator, Allocator, traits>::find() [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/regex_search.hpp:56: instantiated from ‘bool boost::regex_search(BidiIterator, BidiIterator, boost::match_results<BidiIterator, Allocator>&, const boost::basic_regex<charT, traits>&, boost::regex_constants::match_flag_type, BidiIterator) [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, charT = int, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/regex_iterator.hpp:75: instantiated from ‘bool boost::regex_iterator_implementation<BidirectionalIterator, charT, traits>::next() [with BidirectionalIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, charT = int, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/regex_iterator.hpp:142: instantiated from ‘boost::regex_iterator<BidirectionalIterator, charT, traits>& boost::regex_iterator<BidirectionalIterator, charT, traits>::operator++() [with BidirectionalIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, charT = int, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/icu.hpp:847: instantiated from ‘OutputIterator boost::re_detail::do_regex_replace(OutputIterator, const std::pair<I1, I1>&, const boost::u32regex&, const std::pair<I2, I2>&, boost::regex_constants::match_flag_type) [with OutputIterator = boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>, I1 = boost::u16_to_u32_iterator<const UChar*, unsigned int>, I2 = boost::u16_to_u32_iterator<const UChar*, unsigned int>]’ /home/rbock/include/boost/regex/icu.hpp:1008: instantiated from here /home/rbock/include/boost/regex/v4/perl_matcher.hpp:46: warning: comparison of unsigned expression < 0 is always false
Roland Bock wrote:
Hi,
when compiling the following code
<snip> #include <boost/regex.hpp> #include <boost/regex/icu.hpp>
int main() { return 0; } </snip>
with g++ -Wall -Wextra, a bunch of warnings are produced, see below. The first two seem trivial to solve, but I don't know about the third.
Is there a workaround to get rid of the warnings (other than to turn of the -Wall and -Wextra) and/or should I file a bug report?
I will try and look into this shortly, but can you file a bug report so it doesn't get lost? Thanks, John.
Hi, yes, will do and I will add a diff file too which shows what I have done to get rid of the warnings. Thanks and regards, Roland John Maddock wrote:
Roland Bock wrote:
Hi,
when compiling the following code
<snip> #include <boost/regex.hpp> #include <boost/regex/icu.hpp>
int main() { return 0; } </snip>
with g++ -Wall -Wextra, a bunch of warnings are produced, see below. The first two seem trivial to solve, but I don't know about the third.
Is there a workaround to get rid of the warnings (other than to turn of the -Wall and -Wextra) and/or should I file a bug report?
I will try and look into this shortly, but can you file a bug report so it doesn't get lost?
Thanks, John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi, by adding another template specialization for unsigned int in perl_matcher.hpp I got rid of the third warning. What would be the best way to feed this change into boost? Thanks and regards, Roland Roland Bock wrote:
Hi,
when compiling the following code
<snip> #include <boost/regex.hpp> #include <boost/regex/icu.hpp>
int main() { return 0; } </snip>
with g++ -Wall -Wextra, a bunch of warnings are produced, see below. The first two seem trivial to solve, but I don't know about the third.
Is there a workaround to get rid of the warnings (other than to turn of the -Wall and -Wextra) and/or should I file a bug report?
System information: Ubuntu 8.04, 64bit gcc 4.2.4 boost 1.36
Regards,
Roland
PS: Here are the warnings I get: g++ -Wall -Wextra test.cpp -c -I ~/include/ In file included from /home/rbock/include/boost/regex/icu.hpp:1015, from test.cpp:2: /home/rbock/include/boost/regex/v4/u32regex_token_iterator.hpp:286: warning: unused parameter ‘submatch’ /home/rbock/include/boost/regex/v4/u32regex_token_iterator.hpp:348: warning: unused parameter ‘submatch’ /home/rbock/include/boost/regex/v4/perl_matcher.hpp: In function ‘bool boost::re_detail::can_start(charT, const unsigned char*, unsigned char) [with charT = unsigned int]’: /home/rbock/include/boost/regex/v4/perl_matcher_common.hpp:787: instantiated from ‘bool boost::re_detail::perl_matcher<BidiIterator, Allocator, traits>::find_restart_any() [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/perl_matcher_common.hpp:245: instantiated from ‘bool boost::re_detail::perl_matcher<BidiIterator, Allocator, traits>::find_imp() [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/perl_matcher_common.hpp:229: instantiated from ‘bool boost::re_detail::perl_matcher<BidiIterator, Allocator, traits>::find() [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/regex_search.hpp:56: instantiated from ‘bool boost::regex_search(BidiIterator, BidiIterator, boost::match_results<BidiIterator, Allocator>&, const boost::basic_regex<charT, traits>&, boost::regex_constants::match_flag_type, BidiIterator) [with BidiIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, Allocator = std::allocator<boost::sub_match<boost::u16_to_u32_iterator<const UChar*, unsigned int> > >, charT = int, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/regex_iterator.hpp:75: instantiated from ‘bool boost::regex_iterator_implementation<BidirectionalIterator, charT, traits>::next() [with BidirectionalIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, charT = int, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/v4/regex_iterator.hpp:142: instantiated from ‘boost::regex_iterator<BidirectionalIterator, charT, traits>& boost::regex_iterator<BidirectionalIterator, charT, traits>::operator++() [with BidirectionalIterator = boost::u16_to_u32_iterator<const UChar*, unsigned int>, charT = int, traits = boost::icu_regex_traits]’ /home/rbock/include/boost/regex/icu.hpp:847: instantiated from ‘OutputIterator boost::re_detail::do_regex_replace(OutputIterator, const std::pair<I1, I1>&, const boost::u32regex&, const std::pair<I2, I2>&, boost::regex_constants::match_flag_type) [with OutputIterator = boost::utf16_output_iterator<boost::re_detail::unicode_string_out_iterator>, I1 = boost::u16_to_u32_iterator<const UChar*, unsigned int>, I2 = boost::u16_to_u32_iterator<const UChar*, unsigned int>]’ /home/rbock/include/boost/regex/icu.hpp:1008: instantiated from here /home/rbock/include/boost/regex/v4/perl_matcher.hpp:46: warning: comparison of unsigned expression < 0 is always false _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
John Maddock
-
Roland Bock