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]
Other format: [Raw text]

[Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."


------- Additional Comments From kai dot ludwig at uni-tuebingen dot de  2004-07-01 13:23 -------
(In reply to comment #7)
> OK, here's something small: 
> ---------------- 
> template <typename> struct O { 
>     template <typename> struct I { 
>         struct II {}; 
>     }; 
> }; 
>  
> template <typename T> struct X { 
>     typedef typename O<T>::I<int>::II type1; 
>     typedef O<type1>                  type2; 
> }; 
> ---------------------- 
> It still crashes with -pedantic, so something is different. Note that 
> the crash also goes away if I fix the code: one has to write 
>   typedef typename O<T>::template I<int>::II type1; 
>  
> However, this is fixed in 3.4 and mainline, where we get an error message 
> about this, rather than an ICE. 

Indeed that's it. After introducing the 'template' keyword as mentioned above
into the Variable.h source, g++-3.3.3 works as expected.

Thank you Wolfgang,
Kai


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]