This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Constant pointer to (member) function, indirect call
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Helge Bahmann <hcb at chaoticmind dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 01 Mar 2005 14:55:22 -0800
- Subject: Re: Constant pointer to (member) function, indirect call
- Organization: CodeSourcery, LLC
- References: <Pine.LNX.4.44.0502281626240.16022-100000@lothlorien.homelinux.net>
Helge Bahmann wrote:
void (A::*function2)(void) throw()=&A::function2;
(a.*function2)();
however for the call through pointer function2 gcc will always generate an
indirect call, i386 assembly for example looks like:
Yes, it should be able to do so, but it's not. This is probably
something that could be done via range propagation.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304