Skip to content

Commit 645c07b

Browse files
committed
format_expr now outputs constants of type c_bit_field
This adds a case for outputting constants that have c_bit_field type as numbers.
1 parent d3dc560 commit 645c07b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/util/format_expr.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ static std::ostream &format_rec(std::ostream &os, const constant_exprt &src)
171171
else
172172
return os << src.pretty();
173173
}
174-
else if(type == ID_unsignedbv || type == ID_signedbv || type == ID_c_bool)
174+
else if(
175+
type == ID_unsignedbv || type == ID_signedbv || type == ID_c_bool ||
176+
type == ID_c_bit_field)
175177
return os << *numeric_cast<mp_integer>(src);
176178
else if(type == ID_integer)
177179
return os << src.get_value();

0 commit comments

Comments
 (0)