This is the mail archive of the gcc@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]

Re: Is this a bug of gcc ?


Thanks for the quick answer.

This is ok to fix the source, but I do not understand why it is normal behaviour that the foo() in b hides the one from a. They have different prototypes.

Regards,

Pierre Chatelier

This is not a bug in gcc.  foo in b hides the one from a.
You can "fix" the source by:
struct b : public a
{
  virtual int foo(int a) =0;
  using a::foo;
  virtual ~b(){}
};


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