Constant pointer to (member) function, indirect call

2005-02-28 Thread Helge Bahmann
Hello, if I compile the following little code snippet: #include class A { public: virtual ~A(void) {} static void function1(void) throw() {puts("Hello world\n");} void function2(void) throw() {puts("Hello world!\n");} }; int main() { A a; void (*function1)(void)

Re: Constant pointer to (member) function, indirect call

2005-03-02 Thread Helge Bahmann
On Tue, 1 Mar 2005 Mark Mitchell wrote: > 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 f