DWARF Standard


050223.1 Al Grant mutable is not a C++ type qualifier Error Accepted Ben Elliston

Re: Section 5.3, Page 63

5.3 defines DW_TAG_mutable_type for "C++ mutable qualified type".
There are no C++ mutable qualified types.  'mutable' is a modifier
on aggregate members and its behavior is closer to the visibility
attributes such as 'private'.  There are no 'mutable T' types
any more than there are 'private T' types.  In C++ such issues of
whether types are or aren't the same are often crucial, and need
careful reading of the C++ standard.

In the following
  class S { T x; mutable T y; };
x and y have the same type, and their DIEs should reference the
same (or at least identical) type DIE.

Mutability can be indicated by a defining a flag attribute for
DW_TAG_member DIEs.


Add an attribute called DW_AT_mutable with a flag value that
can be used in a DW_TAG_member die.

   In 5.6.6 add a new paragraph 3 (after the DW_AT_accessibilty description)

   The data member will have a DW_AT_mutable attribute with
   the value true if that member was marked with the
   mutable keyword in the source.

   Add DW_AT_mutable to the list next to DW_TAG_member in Appendix A.

   Add DW_AT_mutable to the list of attributes in 2.2 with the
   description:  "Member declared mutable"

   Add DW_AT_mutable to Figure 19 (Attribute Encodings)
   with a suggested number of 0x61

Remove all mention DW_TAG_mutable_type from the standard,
but leave it's number allocated.  I found 5 occurrences
listed here:

   Remove DW_TAG_mutable_type from the list of tag names
   (Figure 1) in section 2.1.

   Remove DW_TAG_mutable_type from section 5.3 (Figure 14)

   Remove DW_TAG_mutable_type from Appendix A (Figure 17)
   (Make sure not to reassign the number 0x3e to another tag.
    Perhaps we should leave the table entry in there with
    an "unused" marker in place of DW_TAG_mutable_type.

   Remove the row in Figure 40 that describes DW_TAG_mutable_type

   Remove the index entry for DW_TAG_mutable_type.

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2007-2021 by DWARF Standards Committee.