@@ -134,8 +134,8 @@ void c_typecheck_baset::typecheck_type(typet &type)
134134 // but we'll try to interpret it the GCC way
135135 if (underlying_type.id ()==ID_c_enum_tag)
136136 {
137- underlying_type=
138- follow_tag (to_c_enum_tag_type (underlying_type)).subtype ();
137+ underlying_type =
138+ follow_tag (to_c_enum_tag_type (underlying_type)).underlying_type ();
139139
140140 assert (underlying_type.id ()==ID_signedbv ||
141141 underlying_type.id ()==ID_unsignedbv);
@@ -1480,7 +1480,7 @@ void c_typecheck_baset::typecheck_c_enum_tag_type(c_enum_tag_typet &type)
14801480
14811481void c_typecheck_baset::typecheck_c_bit_field_type (c_bit_field_typet &type)
14821482{
1483- typecheck_type (type.subtype ());
1483+ typecheck_type (type.underlying_type ());
14841484
14851485 mp_integer i;
14861486
@@ -1508,28 +1508,28 @@ void c_typecheck_baset::typecheck_c_bit_field_type(c_bit_field_typet &type)
15081508 type.remove (ID_size);
15091509 }
15101510
1511- const typet &subtype = type.subtype ();
1511+ const typet &underlying_type = type.underlying_type ();
15121512
15131513 std::size_t sub_width=0 ;
15141514
1515- if (subtype .id ()== ID_bool)
1515+ if (underlying_type .id () == ID_bool)
15161516 {
15171517 // This is the 'proper' bool.
15181518 sub_width=1 ;
15191519 }
1520- else if (subtype. id ()==ID_signedbv ||
1521- subtype .id ()==ID_unsignedbv ||
1522- subtype .id ()== ID_c_bool)
1520+ else if (
1521+ underlying_type .id () == ID_signedbv ||
1522+ underlying_type. id () == ID_unsignedbv || underlying_type .id () == ID_c_bool)
15231523 {
1524- sub_width= to_bitvector_type (subtype ).get_width ();
1524+ sub_width = to_bitvector_type (underlying_type ).get_width ();
15251525 }
1526- else if (subtype .id ()== ID_c_enum_tag)
1526+ else if (underlying_type .id () == ID_c_enum_tag)
15271527 {
15281528 // These point to an enum, which has a sub-subtype,
15291529 // which may be smaller or larger than int, and we thus have
15301530 // to check.
15311531 const auto &c_enum_type =
1532- to_c_enum_type (follow_tag (to_c_enum_tag_type (subtype )));
1532+ to_c_enum_type (follow_tag (to_c_enum_tag_type (underlying_type )));
15331533
15341534 if (c_enum_type.is_incomplete ())
15351535 {
@@ -1538,13 +1538,13 @@ void c_typecheck_baset::typecheck_c_bit_field_type(c_bit_field_typet &type)
15381538 throw 0 ;
15391539 }
15401540
1541- sub_width = to_bitvector_type (c_enum_type.subtype ()).get_width ();
1541+ sub_width = to_bitvector_type (c_enum_type.underlying_type ()).get_width ();
15421542 }
15431543 else
15441544 {
15451545 error ().source_location =type.source_location ();
1546- error () << " bit field with non-integer type: "
1547- << to_string (subtype) << eom;
1546+ error () << " bit field with non-integer type: " << to_string (underlying_type)
1547+ << eom;
15481548 throw 0 ;
15491549 }
15501550
0 commit comments