diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-03-17 17:36:24 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-03-17 17:36:24 +0000 |
commit | ec20aa6ccff4a951fcc2fbb78bb8ca7d0ad16be0 (patch) | |
tree | 9edb78211ce85e0408817f532885ec0202ab4279 /gcc/cp/parser.c | |
parent | 1f43de927f4a02df4301ecc929d9c41acdabf7f8 (diff) | |
download | gcc-ec20aa6ccff4a951fcc2fbb78bb8ca7d0ad16be0.zip gcc-ec20aa6ccff4a951fcc2fbb78bb8ca7d0ad16be0.tar.gz gcc-ec20aa6ccff4a951fcc2fbb78bb8ca7d0ad16be0.tar.bz2 |
re PR c++/9639 ([New parser] Namespace std in constructor argument lists on illegal code causes an ICE)
PR c++/9639
* parser.c (cp_parser_declarator_id): Clear parser->scope.
PR c++/9639
* g++.dg/parse/crash1.C: New test.
From-SVN: r64495
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index f80c260..9c157c2 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10424,7 +10424,10 @@ cp_parser_declarator_id (cp_parser* parser) /* If the name was qualified, create a SCOPE_REF to represent that. */ if (parser->scope) - id_expression = build_nt (SCOPE_REF, parser->scope, id_expression); + { + id_expression = build_nt (SCOPE_REF, parser->scope, id_expression); + parser->scope = NULL_TREE; + } return id_expression; } |