This is the mail archive of the gcc-prs@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]

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



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


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