c++/8205: using declaration & mulitiple inheritance

bangerth@dealii.org bangerth@dealii.org
Mon Nov 4 14:46:00 GMT 2002


Old Synopsis: using declaration doesn't work while mulitiple inheritance was used.
New Synopsis: using declaration & mulitiple inheritance

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Nov  4 14:46:16 2002
State-Changed-Why:
    Right, this is a regression in 3.2, as it compiled cleanly
    in 2.95.I thus set the priority to "high" and let others
    decide what to do with it.
    
    However, it turns out that this is fixed on the mainline
    again (or the problem was never introduced there). For 
    reference, I append the code in question below.
    
    Regards
      Wolfgang
    
    
    -------------------------
    class A { public: int i; };
    class B {};
    class E : A, B { public: using A::i; };
    
    int main() {
      E e;
      e.i; // "`A' is an inaccessible base of `E'"
    }
    ----------------------------------
    tmp/g> /home/bangerth/bin/gcc-3.2.1-pre/bin/c++ -c x.cc
    x.cc: In function `int main()':
    x.cc:7: `A' is an inaccessible base of `E'
    
    tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -c x.cc

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8205



More information about the Gcc-bugs mailing list