egcs-971225 G++ bug report
Michael A. Benzinger
mbenz@sabre.com
Fri Jan 9 05:11:00 GMT 1998
David,
Now this may be something just esoteric enough in the language that
I don't know about it, but can you take the address of a non-static
member function from the class definition? I thought that we could
only address non-static member functions through an instance of the
class as follows:
class A
{
public:
void f();
};
typedef void (A::* pmfA)() const;
A anA_instance;
pmfA var_1 = anA_instance.f;
Any enlightenment?
Mike Benzinger
At 10:17 AM 1/9/98 GMT, David Binderman wrote:
>Hello there,
>
>Since my previous attempt doesn't seem to have arrived, here it is agane.
>
>The following code has I think two errors. egcs-971225 G++ on
>alphaev56-dec-osf4.0b doesn't find the errors, even with flags
>-ansi -pedantic -O -Wall
>
>class A
>{
>public:
> void f();
>};
>
>typedef void (A::* pmfA)() const;
>
>pmfA var_1 = A::f; // error here
>
>class B
>{
>public:
> void g() const;
>};
>
>typedef void (B::* pmfB)();
>
>pmfB var_2 = B::g; // error here
>
>
>Regards
>
>David C Binderman MSc BSc (Hons) +44 171 971 8765
>contracting at Mobile Systems International in the Docklands, London, England
>
>To write code without using Purify, where available, is merely professionally
>irresponsible.
>
>
-------------------------------------------------------------
Michael A. Benzinger
Principal
SABRE Technology Solutions Phone: +1 817-264-6820
1 E. Kirkwood Blvd. Fax: +1 817-264-3504
Southlake, TX 76092 e-mail: mbenz@sabre.com
U.S.A. bzinger@iName.com
More information about the Gcc-bugs
mailing list