Skip to content

Commit

Permalink
Merge pull request #2293 from tautschnig/c++-decltype-bit-field
Browse files Browse the repository at this point in the history
decltype(bit field type) is the underlying subtype
  • Loading branch information
Daniel Kroening authored Jun 7, 2018
2 parents c5de7ba + 8c08946 commit e54bba2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion regression/cpp/Bit_fields1/test.desc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KNOWNBUG
CORE
main.cpp
-std=c++11
^EXIT=0$
Expand Down
6 changes: 5 additions & 1 deletion src/cpp/cpp_typecheck_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ void cpp_typecheckt::typecheck_type(typet &type)
{
exprt e=static_cast<const exprt &>(type.find(ID_expr_arg));
typecheck_expr(e);
type=e.type();

if(e.type().id() == ID_c_bit_field)
type = e.type().subtype();
else
type = e.type();
}
else if(type.id()==ID_unassigned)
{
Expand Down

0 comments on commit e54bba2

Please sign in to comment.