Skip to content

Commit e54bba2

Browse files
author
Daniel Kroening
authored
Merge pull request diffblue#2293 from tautschnig/c++-decltype-bit-field
decltype(bit field type) is the underlying subtype
2 parents c5de7ba + 8c08946 commit e54bba2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

regression/cpp/Bit_fields1/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
KNOWNBUG
1+
CORE
22
main.cpp
33
-std=c++11
44
^EXIT=0$

src/cpp/cpp_typecheck_type.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,11 @@ void cpp_typecheckt::typecheck_type(typet &type)
227227
{
228228
exprt e=static_cast<const exprt &>(type.find(ID_expr_arg));
229229
typecheck_expr(e);
230-
type=e.type();
230+
231+
if(e.type().id() == ID_c_bit_field)
232+
type = e.type().subtype();
233+
else
234+
type = e.type();
231235
}
232236
else if(type.id()==ID_unassigned)
233237
{

0 commit comments

Comments
 (0)