This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/8171] Cannot compare pointer to member function of base and derived class


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8171


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at physics dot uc
                   |                            |dot edu
   Last reconfirmed|2003-05-03 00:00:00         |2003-07-22 19:00:10
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-22 19:00 -------
Here is a shorter one that can be able to put in gcc's testsuite:
extern "C" void abort();
extern "C" void exit(int);

struct A
{
    int f() {}
};

struct B : A
{
};

int main()
{
    int (A::*pa)() = &A::f;
    int (B::*pb)() = &B::f;

    if(! (pa == pb))
        abort();
    exit(0);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]