diff options
author | Paolo Carlini <pcarlini@suse.de> | 2005-03-18 17:16:16 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2005-03-18 17:16:16 +0000 |
commit | 32db39c035bd6b704da8cdbe3b6899acf7d0c814 (patch) | |
tree | e6b759918c6e4024e1dd84fa38a2e017b453e404 /gcc/cp | |
parent | bc7ffd06f70cd9c4cf24b73ee728d9bb9e9a629d (diff) | |
download | gcc-32db39c035bd6b704da8cdbe3b6899acf7d0c814.zip gcc-32db39c035bd6b704da8cdbe3b6899acf7d0c814.tar.gz gcc-32db39c035bd6b704da8cdbe3b6899acf7d0c814.tar.bz2 |
re PR c++/20463 (ICE on using undefined type)
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/parser.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 85ce155..9bcdbb6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 2b6c03b..2724f5a 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 <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; |