Silence gcc 4.3 warning about ambiguous else by adding braces.

This commit is contained in:
Bruno Wolff III 2008-03-19 15:15:56 +00:00
parent 507c57f2a2
commit d481bdad4f

View file

@ -598,11 +598,12 @@ bool preprocessor_data::get_chunk()
if (d == '#')
found_enddef = 1;
else if (found_enddef > 0)
if (++found_enddef == 7)
if (++found_enddef == 7) {
if (std::equal(buffer.end() - 6, buffer.end(), "enddef"))
break;
else
found_enddef = 0;
}
}
if (found_enddef != 7) {
std::string error="Unterminated preprocessor definition at";