From: Alexandre Oliva <aoliva@redhat.com>
To: Tiago Stein <tiago@lisha.ufsc.br>
Cc: gcc@gcc.gnu.org
Subject: Re: Double abstract class Inheritance concern.
Date: Mon, 29 Mar 2004 15:15:00 -0000 [thread overview]
Message-ID: <or65cos8a0.fsf@livre.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <65184.200.138.253.131.1080515997.squirrel@www.lisha.ufsc.br>
On Mar 28, 2004, Tiago Stein <tiago@lisha.ufsc.br> wrote:
> class A{ };
> class B :public A{ };
> class C: public A{ int g; };
> class D: public B, public C { unsigned int foo; };
> Why sizeof class D is 12? Should not be 8? Why the extra size from the
> empty classes is not eliminated this time? Is this due to any rules in the
> standard?
D::B::A and D::C::A must have different addresses.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
next prev parent reply other threads:[~2004-03-29 2:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-29 13:57 Tiago Stein
2004-03-29 15:15 ` Alexandre Oliva [this message]
2004-03-29 14:03 Chris Lattner
2004-03-29 17:16 ` Nathan Sidwell
2004-03-29 18:49 ` Joe Buck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=or65cos8a0.fsf@livre.redhat.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=tiago@lisha.ufsc.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).