From: Paolo Carlini Date: Fri, 18 Mar 2005 17:16:16 +0000 (+0000) Subject: re PR c++/20463 (ICE on using undefined type) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=32db39c035bd6b704da8cdbe3b6899acf7d0c814;p=gcc.git re PR c++/20463 (ICE on using undefined type) 2005-03-18 Paolo Carlini PR c++/20463 * parser.c (cp_parser_diagnose_invalid_type_name): Check TYPE_BINFO (current_class_type) before attempting to emit inform messages. From-SVN: r96689 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 85ce155906e..9bcdbb6bff3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2005-03-18 Paolo Carlini + + PR c++/20463 + * parser.c (cp_parser_diagnose_invalid_type_name): + Check TYPE_BINFO (current_class_type) before attempting + to emit inform messages. + 2005-03-17 Paolo Carlini PR c++/19966 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 2b6c03ba4a9..2724f5a29db 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1995,7 +1995,8 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree scope, tree id) template struct B : public A { X x; }; The user should have said "typename A::X". */ - if (processing_template_decl && current_class_type) + if (processing_template_decl && current_class_type + && TYPE_BINFO (current_class_type)) { tree b;