Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Data Layout


  • To: cxx-abi@xxxxxxxxxxxxxxxxxxxx
  • Subject: Data Layout
  • From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
  • Date: Tue, 14 Dec 1999 13:16:11 -0800

Folks --

  We've started implementing the C++ ABI in g++.  Implementation
efforts tend to uncover a few rough edges in specifications, and the
draft ABI looks to be no exception. :-) We'll send along questions,
and suggested clarifications, as we encounter them.  Picking these
kinds of nits is going to be important if the various implementations
are really going to interoperate.

  Question:

    Does the presence of a zero-width bit-field prevent a class from
    being empty?

  Suggested Resolution:

    No.  Amend the definition of an "empty class" to read:

      A class with no non-static data members other than zero-width
      bitfields, no virtual functions, no virtual base classes, and no
      non-empty non-virtual base classes.

    Amend the definition of a "nearly empty class" to read:

      A class, the objects of which contain only a Vptr and zero-width
      bitfields.

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