Empty class passing

Mark Mitchell mark at codesourcery.com
Tue Dec 5 22:35:56 UTC 2000


As it stands, the current document does not quite say what I thought
Jim and I agreed upon when we met last with respect to passing empty
classes.

In particular, after polling lots of C++ experts, it turns out that
nobody cares about optimizing empty class passing.  Therefore, I think
that we shouldn't say anything special about this case, which will
make life easier for implementors.

In particular, we should not say that "an empty class type will
normally occupy a position in the parameter sequence as though it were
a single-byte integer".  In general, empty classes can take up more
than one byte; we should just say that empty classes will be passed no
differently from ordinary classes, and that if passed in registers the
NaT bit must not be set on all registers that make up the class.

Any objections?

Jim, are you still maintaining the document?  If not, since nobody
objected, should we pass the source to Alex?

Thanks,

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




More information about the cxx-abi-dev mailing list