This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Can our C++ vectors hold derived classes?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>, Diego Novillo <dnovillo at google dot com>
- Date: Thu, 13 Jun 2013 10:19:19 +0200
- Subject: Re: Can our C++ vectors hold derived classes?
- References: <20130612172333 dot GG26236 at virgil dot suse> <CAFiYyc3vYi1XVXcpZn3fP46s8R85oiQu432aLe9G9hSQWWZ3JA at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 13, 2013 at 10:12:08AM +0200, Richard Biener wrote:
> > When I remove the ": public zzzA" part the earnings disappear. Thus,
> > it seems there is an error somewhere... or am I doing something wrong?
>
> I think you need to avoid using vl_embed vectors because their implementation
> uses offsetof.
That is all of them though. vl_ptr uses vl_embed as its vec_ field.
Jakub