26 for(
const auto &symbol_pair : symbol_table.
symbols)
28 if(symbol_pair.second.is_type && symbol_pair.second.type.id() == ID_struct)
33 bool first_time_seen_in_struct =
true;
35 for(struct_typet::componentst::const_iterator it_mem = components.begin();
36 it_mem != components.end();
40 bool first_time_seen_from =
true;
45 if(it_mem->get_is_padding())
49 for(struct_typet::componentst::const_iterator it_next = it_mem;
50 it_next != components.end();
53 const typet &it_type = it_next->type();
58 throw "type of unknown size:\n" + it_type.
pretty();
60 cumulated_length += *size;
66 if(!first_time_seen_from)
71 if(it_mem != it_next && !it_next->get_is_padding())
73 if(first_time_seen_in_struct)
75 first_time_seen_in_struct =
false;
76 first_time_seen_from =
false;
79 <<
"declaration of structure "
81 << symbol_pair.second.location <<
'\n';
84 out <<
"members " << it_mem->get_pretty_name() <<
" and "
85 << it_next->get_pretty_name() <<
" might interfere\n";
90 else if(symbol_pair.second.type.id() == ID_array)
100 throw "type of unknown size:\n"+it_type.pretty();
105 <<
"declaration of an array at "
106 << symbol_pair.second.location <<
107 <<
"\nmight be concurrently accessed\n";