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]

c++/775: 2.97 error declaring nested class a friend



>Number:         775
>Category:       c++
>Synopsis:       2.97 error declaring nested class a friend
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 11 13:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     sebor@roguewave.com
>Release:        gcc version 2.97 20001002 (experimental)
>Organization:
>Environment:

>Description:
The code below generates the following error with a recent
snapshot:

$ gcc -c test.cpp
test.cpp:13: `struct A::B' does not declare a template type

It gives an ICE in 2.95.2.
>How-To-Repeat:
struct A
{
    struct B {
        B () { }
    };
};

template <class T>
struct C: A {
    friend A::B::B ();     // 2.95.2 ICE
    friend struct A::B;    // 2.97 error
};

template class C<char>;
>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]