https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68186
Bug ID: 68186 Summary: Using public base member function privately prevents derived classes using base member function Product: gcc Version: 5.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jwyatt at feralinteractive dot com Target Milestone: --- Created attachment 36637 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36637&action=edit Minimal example The following setup (compiled with g++ -Wall -Wextra) causes the error: ‘int Base::Method()’ is inaccessible within the Derived2 context. This doesn't happen if the using statement within the class Derived is removed, or if it is made public. class Base { public: int Method(); }; class Derived : public Base { using Base::Method; }; class Derived2 : public Derived { using Base::Method; }; g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-default-libstdcxx-abi=c++98 --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)