Boost logo

Boost Users :

Subject: [Boost-users] [Regex]: Warnings for unicode regex includes
From: Roland Bock (rbock_at_[hidden])
Date: 2008-11-18 15:28:26


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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net