From mboxrd@z Thu Jan 1 00:00:00 1970 From: bachir.ghoubali@avisto.com To: gcc-gnats@gcc.gnu.org Subject: c++/4100: g++ 3.0.1 compiles illegal c++ code Date: Thu, 23 Aug 2001 10:56:00 -0000 Message-id: <20010823175020.19639.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00596.html List-Id: >Number: 4100 >Category: c++ >Synopsis: g++ 3.0.1 compiles illegal c++ code >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Thu Aug 23 10:56:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Bachir GHOUBALI >Release: 3.0.1 >Organization: >Environment: Solaris 7, G++ 3.0.1 >Description: Following code is illegal because friend cannot not be used in type definition. G++ compiles without complaining. class A { public: friend class B { }; }; int main() { A a; } >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: