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(); }