[Bug c++/29503] Internal Compiler Error with Friend + Template + Typedef

2006-10-18 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2006-10-18 17:12 ---
The ICE is fixed in 4.0.4 for sure:
[EMAIL PROTECTED] ~]$ ~/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
[EMAIL PROTECTED] ~]$ ~/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
[EMAIL PROTECTED] ~]$ ~/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.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29503



[Bug c++/29503] Internal Compiler Error with Friend + Template + Typedef

2006-10-18 Thread fang at csl dot cornell dot edu


--- Comment #2 from fang at csl dot cornell dot edu  2006-10-18 20:25 
---
That would be PR 21498.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29503