This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Question about empty classes


> From: Carlo Wood <carlo@runaway.xs4all.nl>
> To: egcs@cygnus.com
> Date: Mon, 9 Nov 1998 14:10:23 +0100 (CET)

> I try hard to save memory in my designs, which is why I was
> unpleasantly surpriced to find out that egcs (1.1b) assigns
> at least 4 bytes to any empty class :/.

* An _experimental_ new ABI for g++ can be turned on with -fnew-abi.  The
  current features of this are more efficient allocation of base classes
  (including the empty base optimization)

If you don't care about abi, you can switch the default to on, and
recompile the compiler, and your app.  I don't recommend just using
the switch (because of libstdc++).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]