This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/775: 2.97 error declaring nested class a friend
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/775: 2.97 error declaring nested class a friend
- From: sebor at roguewave dot com
- Date: 11 Nov 2000 21:29:12 -0000
- Reply-To: sebor at roguewave dot com
>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: