if (s == _m_symbols.end ())
{
// No symbol in table, OK, if not a defining or const object.
- // GNU extension, anonymous structs can have a linkage_name.
+ // GNU extension, anonymous structs, enums and unions can
+ // have a linkage_name.
if (attrs.find (DW_AT_declaration) == attrs.end ()
&& attrs.find (DW_AT_const_value) == attrs.end ()
&& ((entry.tag () != DW_TAG_structure_type
- && entry.tag () != DW_TAG_enumeration_type)
+ && entry.tag () != DW_TAG_enumeration_type
+ && entry.tag () != DW_TAG_union_type)
|| attrs.find (DW_AT_name) != attrs.end ()))
{
wr_message (to_where (entry),
.optional (DW_AT_specification)
.optional (DW_AT_start_scope)
.optional (DW_AT_visibility)
+ .optional (at_linkage_name) // GNU extension for anonymous typedef unions.
;
m_map [DW_TAG_unspecified_parameters]