https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96957
Bug ID: 96957 Summary: No name-lookup into base class when using an non dependent base class via template alias with dummy parameter. Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: anders.granlund.0 at gmail dot com Target Milestone: --- Consider the following c++ program: class A { protected: int x; }; template<typename X> using B = A; template<typename T> class C : public B<T> { public: void f() { x = 0; } }; int main() { } Compile it with "-std=c++17 -pedantic-errors". Expected behaviour: Since the base class is not dependent (see http://wg21.link/cwg1390 ) the name lookup of x should succeed and no error message should be outputed during the compilation. Observed behaviour: An compilation error about failing the name lookup of x was outputed during the compilation. GCC is correctly compiling the program with no error messages outputed. See the discussion in: https://bugs.llvm.org/show_bug.cgi?id=47435