DWARF Standard


141215.3 Cary Coutant Mark defaulted member functions Enhancement Open Cary Coutant

In order to represent defaulted member functions, we should add a
DW_AT_defaulted attribute.

Proposed Changes to the Spec

Add the following row to Table 2.2 ("Attribute names"):

    Attribute        Identifies or Specifies
    ---------        -----------------------
    DW_AT_defaulted  Whether a member function has been
                     declared as default

Add the following paragraph to Section 5.7.7 ("Member Function

    In C++, a special member function may be declared as
    defaulted, which explicitly declares a default
    compiler-generated implementation of the function. The
    declaration may have different effects on the calling
    convention used for objects of its class, depending on
    whether the default declaration is made inside or outside the

    A member function may have a DW_AT_defaulted attribute
    whose integer constant value indicates whether, and if so,
    how, that member is defaulted. The possible values and
    their meanings are shown in Figure xx following.

        Table xx. Defaulted Attribute Values
        Name                        Meaning
        ----                        -------
        DW_DEFAULTED_no             Not defaulted
        DW_DEFAULTED_in_class       Defaulted within the class
        DW_DEFAULTED_out_of_class   Defaulted outside of the class

    The absence of a DW_AT_DEFAULTED attribute is equivalent to
    the presence of a DW_AT_DEFAULTED attribute whose value is

    An artificial member function (i.e., a compiler-generated
    copy that does not appear in the source) does not have a
    DW_AT_defaulted attribute.

Add the following rows to Table 7.5 ("Attribute encodings"):

    Attribute name          Value   Classes
    --------------          -----   -------
    DW_AT_defaulted         xxx     const

Add the following sections to Chapter 7 ("Data Representation"):

    7.X Defaulted Member Codes

    The encodings of the constants used in the DW_AT_defaulted
    attribute are given in Table 7.XX.

        Table 7.XX Defaulted member encodings

        Defaulted code name         Value
        -------------------         -----
        DW_DEFAULTED_no             0x00
        DW_DEFAULTED_in_class       0x01
        DW_DEFAULTED_out_of_class   0x02

In Appendix A, Table A.1 ("Attributes by tag value"), add
DW_AT_defaulted to DW_TAG_subprogram.

2014/12/15 -- Replacement for 141003.1
2015/01/23 -- Accepted with modificaitons
2015/02/20 -- Updated.

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