Apply updated patches from #8476.

Fixes #8476.

[SVN r84052]
This commit is contained in:
John Maddock
2013-04-26 10:33:22 +00:00
parent eed2a486c4
commit 8a16bff57a
3 changed files with 5 additions and 17 deletions

View File

@ -738,16 +738,13 @@ void basic_regex_creator<charT, traits>::fixup_pointers(re_syntax_base* state)
case syntax_element_long_set_rep: case syntax_element_long_set_rep:
// set the state_id of this repeat: // set the state_id of this repeat:
static_cast<re_repeat*>(state)->state_id = m_repeater_id++; static_cast<re_repeat*>(state)->state_id = m_repeater_id++;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case syntax_element_alt: case syntax_element_alt:
std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map)); std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map));
static_cast<re_alt*>(state)->can_be_null = 0; static_cast<re_alt*>(state)->can_be_null = 0;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case syntax_element_jump: case syntax_element_jump:
static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state); static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state);
// fall through again:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
default: default:
if(state->next.i) if(state->next.i)
@ -880,6 +877,7 @@ void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
} }
} }
} }
break;
default: default:
break; break;
} }
@ -944,7 +942,6 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
e.raise(); e.raise();
} }
} }
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
default: default:
state = state->next.p; state = state->next.p;
@ -1157,14 +1154,13 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
break; break;
} }
m_recursion_checks[recursion_sub] = true; m_recursion_checks[recursion_sub] = true;
// fall through, can't handle nested recursion here... // can't handle nested recursion here...
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
} }
case syntax_element_backref: case syntax_element_backref:
// can be null, and any character can match: // can be null, and any character can match:
if(pnull) if(pnull)
*pnull |= mask; *pnull |= mask;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case syntax_element_wild: case syntax_element_wild:
{ {
@ -1365,7 +1361,6 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,
state = state->next.p->next.p; state = state->next.p->next.p;
break; break;
} }
// otherwise fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
default: default:
state = state->next.p; state = state->next.p;
@ -1463,6 +1458,7 @@ void basic_regex_creator<charT, traits>::set_bad_repeat(re_syntax_base* pt)
if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT) if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT)
m_bad_repeats |= (one << state_id); m_bad_repeats |= (one << state_id);
} }
break;
default: default:
break; break;
} }
@ -1544,7 +1540,6 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st
case syntax_element_long_set_rep: case syntax_element_long_set_rep:
if(this->m_has_backrefs == 0) if(this->m_has_backrefs == 0)
static_cast<re_repeat*>(state)->leading = true; static_cast<re_repeat*>(state)->leading = true;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
default: default:
return; return;

View File

@ -369,7 +369,6 @@ bool basic_regex_parser<charT, traits>::parse_extended()
while((m_position != m_end) && !is_separator(*m_position++)){} while((m_position != m_end) && !is_separator(*m_position++)){}
return true; return true;
} }
// Otherwise fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
default: default:
result = parse_literal(); result = parse_literal();
@ -624,7 +623,6 @@ bool basic_regex_parser<charT, traits>::parse_basic_escape()
{ {
case 'w': case 'w':
negate = false; negate = false;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case 'W': case 'W':
{ {
@ -642,7 +640,6 @@ bool basic_regex_parser<charT, traits>::parse_basic_escape()
} }
case 's': case 's':
negate = false; negate = false;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case 'S': case 'S':
return add_emacs_code(negate); return add_emacs_code(negate);
@ -675,7 +672,6 @@ bool basic_regex_parser<charT, traits>::parse_extended_escape()
{ {
case regex_constants::escape_type_not_class: case regex_constants::escape_type_not_class:
negate = true; negate = true;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case regex_constants::escape_type_class: case regex_constants::escape_type_class:
{ {
@ -746,7 +742,6 @@ escape_type_class_jump:
break; break;
case regex_constants::escape_type_not_property: case regex_constants::escape_type_not_property:
negate = true; negate = true;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case regex_constants::escape_type_property: case regex_constants::escape_type_property:
{ {
@ -906,7 +901,7 @@ escape_type_class_jump:
case regex_constants::escape_type_control_v: case regex_constants::escape_type_control_v:
if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
goto escape_type_class_jump; goto escape_type_class_jump;
// fallthrough: BOOST_FALLTHROUGH;
default: default:
this->append_literal(unescape_character()); this->append_literal(unescape_character());
break; break;
@ -1964,7 +1959,6 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()
{ {
case regex_constants::syntax_or: case regex_constants::syntax_or:
m_mark_reset = m_mark_count; m_mark_reset = m_mark_count;
// fall through:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
case regex_constants::syntax_colon: case regex_constants::syntax_colon:
// //

View File

@ -283,7 +283,7 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
format_perl(); format_perl();
break; break;
} }
// fall through, not a special character: // not a special character:
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
default: default:
put(*m_position); put(*m_position);
@ -355,7 +355,6 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format
case '{': case '{':
have_brace = true; have_brace = true;
++m_position; ++m_position;
// fall through....
BOOST_FALLTHROUGH; BOOST_FALLTHROUGH;
default: default:
// see if we have a number: // see if we have a number: