c++/7229: Internal compiler error in g++

Reichelt reichelt@igpm.rwth-aachen.de
Mon Jul 15 02:32:00 GMT 2002


Hi,

the bug is in fact an ice-on-illegal-code, since the template constructor
of the class "datastream" is ill-formed ("type_traits" is a namespace and
not a template class!!!):

    template<typename functorT>
    datastream(typename boost::type_traits<functorT>::add_reference fun)

IMHO it should read as follows:

    template<typename functorT>
    datastream(typename boost::add_reference<functorT> fun)

The following code snippet reproduces the ICE on gcc 2.95.x, 3.0.x, 3.1
and the main trunk as of 20020702 (checked on i686-pc-linux-gnu):

------------------------snip here-------------------------
namespace A { namespace B { typedef int type; } }
typename A::B<0>::type x;
------------------------snip here-------------------------

With gcc 3.1 I get the following error:
bug.cc:2: Internal compiler error in make_typename_type, at cp/decl.c:5715
Please submit a full bug report, [etc.]

Greetings,
Volker Reichelt

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7229




More information about the Gcc-bugs mailing list