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]

c++/8577: postfix operator not inherithed


>Number:         8577
>Category:       c++
>Synopsis:       postfix operator not inherithed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 13 22:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Delana.Lorenzo@libero.it
>Release:        gcc-3.2
>Organization:
>Environment:
Linux
>Description:
#include <iostream>
using namespace std;

class A
{
public:
virtual void toimplement () = 0;
void implemented () { toimplement(); }
virtual void operator ++ () = 0;
void operator ++ (int) { printf ("Postfix inc\n"); }
};

class B : public A {
public:
void toimplement () { printf ("IMPLEMENTATION of pure\n"); }
void operator ++ () { printf ("Prefix inc\n"); }
};

int
main ()
{
  B b;
b.implemented ();
++b;
b++; // b not inherit the implemented A baseclass level postfix operator
}
>How-To-Repeat:
compile simple source code
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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