Skip to content

Commit 7b47e9f

Browse files
committed
is_null_pointer: remove code path that is no longer necessary
It seems all front-ends have been updated.
1 parent 42b70b2 commit 7b47e9f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/util/std_expr.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,12 @@ bool constant_exprt::is_null_pointer() const
3030
if(get_value() == ID_NULL)
3131
return true;
3232

33-
// We used to support "0" (when NULL_is_zero), but really front-ends should
34-
// resolve this and generate ID_NULL instead.
35-
#if 0
36-
return config.ansi_c.NULL_is_zero && value_is_zero_string();
37-
#else
33+
// We used to support "0" (when NULL_is_zero), but really front-ends should
34+
// resolve this and generate ID_NULL instead.
3835
INVARIANT(
3936
!value_is_zero_string() || !config.ansi_c.NULL_is_zero,
4037
"front-end should use ID_NULL");
4138
return false;
42-
#endif
4339
}
4440

4541
void constant_exprt::check(const exprt &expr, const validation_modet vm)

0 commit comments

Comments
 (0)