c++/4100: g++ 3.0.1 compiles illegal c++ code

bachir.ghoubali@avisto.com bachir.ghoubali@avisto.com
Thu Aug 23 10:56:00 GMT 2001


>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:



More information about the Gcc-bugs mailing list