Skip to content

Commit dbe5557

Browse files
authored
Merge pull request #7368 from remi-delmas-3000/typed_target-typechecking-fix
CONTRACTS: dont typecheck typed_target operands twice
2 parents 2c5d717 + 2e61263 commit dbe5557

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ansi-c/c_typecheck_expr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,7 @@ void c_typecheck_baset::typecheck_typed_target_call(
19441944
}
19451945

19461946
auto arg0 = expr.arguments().front();
1947-
typecheck_expr(arg0);
1947+
19481948
if(!is_assignable(arg0) || !arg0.get_bool(ID_C_lvalue))
19491949
{
19501950
throw invalid_source_file_exceptiont{
@@ -1976,7 +1976,7 @@ void c_typecheck_baset::typecheck_typed_target_call(
19761976
arguments.push_back(false_exprt());
19771977

19781978
expr.arguments().swap(arguments);
1979-
typecheck_side_effect_function_call(expr);
1979+
expr.type() = empty_typet();
19801980
}
19811981

19821982
void c_typecheck_baset::typecheck_side_effect_function_call(

0 commit comments

Comments
 (0)