@@ -134,8 +134,8 @@ void c_typecheck_baset::typecheck_type(typet &type)
134
134
// but we'll try to interpret it the GCC way
135
135
if (underlying_type.id ()==ID_c_enum_tag)
136
136
{
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 ();
139
139
140
140
assert (underlying_type.id ()==ID_signedbv ||
141
141
underlying_type.id ()==ID_unsignedbv);
@@ -1480,7 +1480,7 @@ void c_typecheck_baset::typecheck_c_enum_tag_type(c_enum_tag_typet &type)
1480
1480
1481
1481
void c_typecheck_baset::typecheck_c_bit_field_type (c_bit_field_typet &type)
1482
1482
{
1483
- typecheck_type (type.subtype ());
1483
+ typecheck_type (type.underlying_type ());
1484
1484
1485
1485
mp_integer i;
1486
1486
@@ -1508,28 +1508,28 @@ void c_typecheck_baset::typecheck_c_bit_field_type(c_bit_field_typet &type)
1508
1508
type.remove (ID_size);
1509
1509
}
1510
1510
1511
- const typet &subtype = type.subtype ();
1511
+ const typet &underlying_type = type.underlying_type ();
1512
1512
1513
1513
std::size_t sub_width=0 ;
1514
1514
1515
- if (subtype .id ()== ID_bool)
1515
+ if (underlying_type .id () == ID_bool)
1516
1516
{
1517
1517
// This is the 'proper' bool.
1518
1518
sub_width=1 ;
1519
1519
}
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)
1523
1523
{
1524
- sub_width= to_bitvector_type (subtype ).get_width ();
1524
+ sub_width = to_bitvector_type (underlying_type ).get_width ();
1525
1525
}
1526
- else if (subtype .id ()== ID_c_enum_tag)
1526
+ else if (underlying_type .id () == ID_c_enum_tag)
1527
1527
{
1528
1528
// These point to an enum, which has a sub-subtype,
1529
1529
// which may be smaller or larger than int, and we thus have
1530
1530
// to check.
1531
1531
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 )));
1533
1533
1534
1534
if (c_enum_type.is_incomplete ())
1535
1535
{
@@ -1538,13 +1538,13 @@ void c_typecheck_baset::typecheck_c_bit_field_type(c_bit_field_typet &type)
1538
1538
throw 0 ;
1539
1539
}
1540
1540
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 ();
1542
1542
}
1543
1543
else
1544
1544
{
1545
1545
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;
1548
1548
throw 0 ;
1549
1549
}
1550
1550
0 commit comments