aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-10-24 14:45:52 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-10-24 14:45:52 +0000
commitd9a503018007da3173ace8c7f6a2211f8574e773 (patch)
tree0a820e98eecb9257bbb9fec1d6b3f9ab1554cc1e /gcc/cp/parser.c
parentb6d8393123f45dac768ba6da0dfd58f80074557d (diff)
downloadgcc-d9a503018007da3173ace8c7f6a2211f8574e773.zip
gcc-d9a503018007da3173ace8c7f6a2211f8574e773.tar.gz
gcc-d9a503018007da3173ace8c7f6a2211f8574e773.tar.bz2
re PR c++/11076 (ICE with invalid base class)
PR c++/11076 * class.c (handle_using_decl): Swap arguments of error_not_base_type. * parser.c (cp_parser_direct_declarator): Only resolve typename for namespace scope declarations. * g++.dg/template/crash13.C: New test. From-SVN: r72897
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 5a0c96e..9b040f5 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -9871,7 +9871,8 @@ cp_parser_direct_declarator (cp_parser* parser,
if (declarator == error_mark_node)
break;
- if (TREE_CODE (declarator) == SCOPE_REF)
+ if (TREE_CODE (declarator) == SCOPE_REF
+ && !current_scope ())
{
tree scope = TREE_OPERAND (declarator, 0);