Summary: | Internal Compiler Error with Friend + Template + Typedef | ||
---|---|---|---|
Product: | gcc | Reporter: | Mangesh Joshi <mangeshaj> |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | gcc-bugs |
Priority: | P3 | ||
Version: | unknown | ||
Target Milestone: | 4.0.4 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
Mangesh Joshi
2006-10-18 16:37:40 UTC
The ICE is fixed in 4.0.4 for sure: [pinskia@celery ~]$ ~/gcc-4.0/bin/gcc t.cc t.cc:16: error: using typedef-name ‘TD::Factory’ after ‘class’ t.cc:13: error: ‘TD::Factory’ has a previous declaration here t.cc:18: error: expected unqualified-id at end of input [pinskia@celery ~]$ ~/gcc-4.1/bin/gcc t.cc t.cc:16: error: using typedef-name ‘TD::Factory’ after ‘class’ t.cc:13: error: ‘TD::Factory’ has a previous declaration here t.cc:18: error: expected unqualified-id at end of input [pinskia@celery ~]$ ~/gcc-local/bin/gcc t.cc t.cc:16: error: using typedef-name ‘TD::Factory’ after ‘class’ t.cc:13: error: ‘TD::Factory’ has a previous declaration here t.cc:18: error: expected unqualified-id at end of input You cannot friend a typedef at least not yet, there is a defect report about that in the C++ standard and another bug filed against GCC for it also but I cannot find it right now. |