re PR c++/20463 (ICE on using undefined type)
authorPaolo Carlini <pcarlini@suse.de>
Fri, 18 Mar 2005 17:16:16 +0000 (17:16 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 18 Mar 2005 17:16:16 +0000 (17:16 +0000)
2005-03-18  Paolo Carlini  <pcarlini@suse.de>

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

gcc/cp/ChangeLog
gcc/cp/parser.c

index 85ce155906e06de82327da9fd5cb35aa2036bb88..9bcdbb6bff379bebd2d5c471c22f4e445c47b115 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-18  Paolo Carlini  <pcarlini@suse.de>
+
+       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  <pcarlini@suse.de>
 
        PR c++/19966
index 2b6c03ba4a9e780ea133029fde8f1d11cd05c914..2724f5a29db0850648ccdced7513cf4333f0f07a 100644 (file)
@@ -1995,7 +1995,8 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree scope, tree id)
           template <typename T> struct B : public A<T> { X x; };
 
         The user should have said "typename A<T>::X".  */
-      if (processing_template_decl && current_class_type)
+      if (processing_template_decl && current_class_type
+         && TYPE_BINFO (current_class_type))
        {
          tree b;