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++/16716] New: [3.5 regression] ICE in cp_parser_parse_and_diagnose_invalid_type_name


Take this (invalid, the "typename" shouldn't be there) piece of code: 
------------------- 
template <typename> class allocator; 
 
template<typename T> class vector { 
    typedef typename allocator<T> allocator_type; 
}; 
------------------ 
 
g/x> /home/bangerth/bin/gcc-3.2.3/bin/c++ -c x.cc 
x.cc:4: syntax error before `;' token 
 
g/x> /home/bangerth/bin/gcc-3.3*/bin/c++ -c x.cc 
x.cc:4: error: parse error before `;' token 
 
g/x> /home/bangerth/bin/gcc-3.4*/bin/c++ -c x.cc 
x.cc:4: error: expected nested-name-specifier 
x.cc:4: error: `allocator<T>' specified as declarator-id 
x.cc:4: error: two or more data types in declaration of `allocator<T>' 
x.cc:4: error: expected `;' before "allocator_type" 
 
g/x> /home/bangerth/bin/gcc-3.5*/bin/c++ -c x.cc 
x.cc:4: error: expected nested-name-specifier 
x.cc:4: internal compiler error: in 
cp_parser_parse_and_diagnose_invalid_type_name, at cp/parser.c:2268 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
That's a regression. 
 
W.

-- 
           Summary: [3.5 regression] ICE in
                    cp_parser_parse_and_diagnose_invalid_type_name
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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