This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/8205: using declaration & mulitiple inheritance


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]