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

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Oct 18 17:12:00 GMT 2006



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


-- 

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



More information about the Gcc-bugs mailing list