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++/1033: ICE when a non-template class is declared as a template friend



>Number:         1033
>Category:       c++
>Synopsis:       ICE when a non-template class is declared as a template friend
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 10 20:56:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Borislav Iordanov
>Release:        gcc 2.95.2
>Organization:
>Environment:
SuSE Linux 7.0
>Description:
gcc reports an "Internal Compiler Error" when a normal (non-templetized) class is declared as a friend in another class. A very simple example reproduces the problem, see below.
>How-To-Repeat:
Try to compile the file code:

class A { };
class B { template<class T> friend class A; }
int main() { return 0; }
>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]