Mangling local statics in constructors and destructors

Mark Mitchell mark at codesourcery.com
Thu Nov 16 22:09:54 UTC 2000


In this kind of code:

  struct S {
    S ();
    ~S ();
  };

  inline S::S () {
    static int i;

    i = 7;
  }

  inline S::~S () {
    static int j;

    j = 9;
  }

we need manglings for the local static variables.  These need to be
consistent across the various constructor/destructor entry points; at
present we do not have a mangling for a constructor independent of its
entry point.

Alex and I think we should use the `C1', `D1' alternatives for this
case; these are the "complete" object constructors and destructors,
which seems as sensible a choice as any.

I don't think this is controversial; Jim, would you mind adding this
to the document?

Thanks,

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the cxx-abi-dev mailing list