Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regression/systemc/Array2/test.desc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KNOWNBUG
CORE
main.cpp
-DNO_IO -DNO_STRING
^EXIT=0$
Expand Down
8 changes: 5 additions & 3 deletions src/cpp/cpp_typecheck_code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ void cpp_typecheckt::typecheck_member_initializer(codet &code)

// Let's first typecheck the operands.
Forall_operands(it, code)
{
const bool has_array_ini = it->get_bool("#array_ini");
typecheck_expr(*it);
if(has_array_ini)
it->set("#array_ini", true);
}

// The initializer may be a data member (non-type)
// or a parent class (type).
Expand Down Expand Up @@ -323,9 +328,6 @@ void cpp_typecheckt::typecheck_member_initializer(codet &code)
// it's a data member
already_typechecked(symbol_expr);

Forall_operands(it, code)
already_typechecked(*it);

exprt call=
cpp_constructor(code.source_location(), symbol_expr, code.operands());

Expand Down