We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2db2b53 commit 8ddf489Copy full SHA for 8ddf489
src/goto-programs/remove_function_pointers.cpp
@@ -391,13 +391,13 @@ void remove_function_pointerst::remove_function_pointer(
391
t3->make_goto(t_final, true_exprt());
392
393
// goto to call
394
- address_of_exprt address_of(fun, pointer_type(fun.type()));
+ const address_of_exprt address_of(fun, pointer_type(fun.type()));
395
396
- if(address_of.type()!=pointer.type())
397
- address_of.make_typecast(pointer.type());
+ const auto casted_address =
+ typecast_exprt::conditional_cast(address_of, pointer.type());
398
399
goto_programt::targett t4=new_code_gotos.add_instruction();
400
- t4->make_goto(t1, equal_exprt(pointer, address_of));
+ t4->make_goto(t1, equal_exprt(pointer, casted_address));
401
}
402
403
// fall-through
0 commit comments