C++ PATCH: Old ABI compatibility

Mark Mitchell mark@codesourcery.com
Wed Jul 12 15:05:00 GMT 2000


  According to Mark Mitchell:
  > >>>>> "Chip" == Chip Salzenberg <chip@valinux.com> writes:
  >     Chip> True, BUT: Is it at least safe to assume that single,
  >     Chip> non-virtual inheritance results in no deltas?
  > 
  > No.  That's true in all the ABI's I know of, but I don't think
  > anything in the standard guarantees this [...]

  I seem to recall an ANSI C requirement that:
     (void*)(&struct) == (void*)(&struct.first_member)
  In other words,
     OFFSETOF(struct, first_member) == 0

  Could that be parlayed into a single-inheritance delta requirement?

Nope.  And Jason's more careful reading of your question yields an
immediate counter-example in the IA64 ABI.  (I construed your question
to be about almost-PODs, i.e., PODs with single inheritance.)

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


More information about the Gcc-patches mailing list