This is the mail archive of the gcc-prs@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]

Re: c++/8061: ICE in grokdeclarator, at cp/decl.c:10142


Synopsis: ICE in grokdeclarator, at cp/decl.c:10142

State-Changed-From-To: analyzed->closed
State-Changed-By: reichelt
State-Changed-When: Wed Jan 15 05:22:20 2003
State-Changed-Why:
    Fixed in gcc 3.4-20030113 with the new parser.
    
    For the first reduced testcase
    
    ---------------------------snip here---------------
    struct A
    {
        template <typename T> struct B {};
    };
    
    template <typename T> struct C
    {
        typedef A::template B<void> Type;
    };
    ---------------------------snip here---------------
    
    which lacks a typename after the typedef, we now get the error message
    
    PR8061.cc:13: error: type `A' is not derived from type `C<T>'
    PR8061.cc:13: error: ISO C++ forbids declaration of `B' with no type
    PR8061.cc:13: error: template-id `B<void>' used as a declarator
    PR8061.cc:13: error: expected function-definition
    
    For the original testcase we get (among other messages) the equivalent
    message (c:/boost/boost/python/detail/def_helper.hpp:54 is the position
    where the ICE occured before):
    
    In file included from test.cpp:9:
    c:/boost/boost/python/detail/def_helper.hpp:54: error: type `
       boost::python::detail::tuple_extract_impl<boost::python::detail::tuple_extract_base_select<Tuple,
       Predicate>::match>' is not derived from type `
       boost::python::detail::tuple_extract_base_select<Tuple, Predicate>'
    c:/boost/boost/python/detail/def_helper.hpp:54: error: template-id `
       apply<Tuple, Predicate>' used as a declarator
    c:/boost/boost/python/detail/def_helper.hpp:54: error: expected 
       function-definition
    
    The second reduced testcase also also gives a correct error message without ICE.
    
    (Testcases in preparation.)

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


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