c++/1033: ICE when a non-template class is declared as a template friend

biordanov@hotmail.com biordanov@hotmail.com
Sun Dec 10 20:56:00 GMT 2000


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


More information about the Gcc-bugs mailing list