This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Getting a pointer to a vtable
- From: Ian Lance Taylor <iant at google dot com>
- To: Mike Hommey <mh at glandium dot org>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 26 Mar 2012 13:48:45 -0700
- Subject: Re: Getting a pointer to a vtable
- References: <20120326100826.GA10429@glandium.org>
Mike Hommey <mh@glandium.org> writes:
> Essentially, I would like to do something like:
>
> void *bar = (void *)_ZTV3foo;
>
> Except I only know "foo", and it may be namespaced. So is there some way
> to have g++ do the mangling with a macro or something else?
There is no macro that does mangling, no.
Why not simply
void *bar = &foo;
?
Ian