Remove duplicate code covered by do_typecast

git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@3532 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
This commit is contained in:
kroening 2014-01-20 13:30:08 +00:00
parent 2673b94718
commit 85e6632acf
1 changed files with 1 additions and 14 deletions

View File

@ -454,20 +454,7 @@ void c_typecastt::implicit_typecast_arithmetic(
}
if(new_type!=expr_type)
{
if(new_type.id()==ID_pointer &&
expr_type.id()==ID_array)
{
exprt index_expr(ID_index, expr_type.subtype());
index_expr.reserve_operands(2);
index_expr.move_to_operands(expr);
index_expr.copy_to_operands(gen_zero(index_type()));
expr=exprt(ID_address_of, new_type);
expr.move_to_operands(index_expr);
}
else
do_typecast(expr, new_type);
}
do_typecast(expr, new_type);
}
/*******************************************************************\