This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
- From: "kai dot ludwig at uni-tuebingen dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Jul 2004 13:23:34 -0000
- Subject: [Bug c++/16295] -pedantic option resolves compiler error "sorry, unimplemented: ..."
- References: <20040630113614.16295.kai.ludwig@uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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