From 645c07b42da589f7d9d2f8d8c8492faa0eb6517a Mon Sep 17 00:00:00 2001 From: Daniel Kroening Date: Sun, 8 Aug 2021 16:54:11 +0100 Subject: [PATCH] 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. --- src/util/format_expr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/format_expr.cpp b/src/util/format_expr.cpp index 3248e890527..41b0f202218 100644 --- a/src/util/format_expr.cpp +++ b/src/util/format_expr.cpp @@ -171,7 +171,9 @@ static std::ostream &format_rec(std::ostream &os, const constant_exprt &src) else return os << src.pretty(); } - else if(type == ID_unsignedbv || type == ID_signedbv || type == ID_c_bool) + else if( + type == ID_unsignedbv || type == ID_signedbv || type == ID_c_bool || + type == ID_c_bit_field) return os << *numeric_cast(src); else if(type == ID_integer) return os << src.get_value();