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

Igel <ich.freak at gmx dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ich.freak at gmx dot net

--- Comment #21 from Igel <ich.freak at gmx dot net> ---
Seconded! This bug still exists in 9.2.0. Here's another example:

class Base {  protected: int i; };
class Derived:  public Base    { using Base::i; };
class Derived2: public Derived { using Derived::i; };
int main(){}

> g++ test.cpp -o test
test.cpp:3:7: error: 'int Base::i' is protected within this context
    3 | class Derived2: public Derived { using Derived::i; };
      |       ^~~~~~~~
test.cpp:1:30: note: declared protected here
    1 | class Base {  protected: int i; };
      |                              ^

no mention of line 2 where the actual problem is (namely that i is declared
private (not protected)).

cheers

Reply via email to