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++/78001] [7 Regression] ncurses build error


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78001

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So I think GCC is correct here.  A is a non-dependent base so it can be looked
at definition time.  m_fn1 is not a const qualified either.

Does other compiler reject:
class A {
protected:
  void m_fn1();
};
struct B : A {
  void m_fn2() const { m_fn1(); }
};


How about:
class A {
protected:
  void m_fn1();
};
template <class> struct B : A {
  void m_fn2() const { m_fn1(); }
};

B<int> a;
void f(void) { a.m_fn2(); }

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