Skip to content

Commit 46bae3d

Browse files
committed
Added reading in printf instructions
1 parent c0c51c3 commit 46bae3d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/analyses/goto_rw.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,12 @@ void goto_rw(goto_programt::const_targett target,
10301030
break;
10311031

10321032
case OTHER:
1033-
// don't know
1033+
//if it's printf, mark the operands as read here
1034+
if (target->code.get(ID_statement)==ID_printf)
1035+
{
1036+
forall_expr(it, target->code.operands())
1037+
rw_set.get_objects_rec(target, rw_range_sett::READ, *it);
1038+
}
10341039
break;
10351040

10361041
case SKIP:

0 commit comments

Comments
 (0)