diff options
author | Jason Merrill <jason@redhat.com> | 2009-02-02 13:38:10 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-02-02 13:38:10 -0500 |
commit | ce6b9ebbe247f368ea9f75427b53b7065e94b0db (patch) | |
tree | 9390a44a3be5716a9169876afd42340bb7397888 /gcc/cp/parser.c | |
parent | e007946898e3371d82dff0f9b0ec11af178be3f2 (diff) | |
download | gcc-ce6b9ebbe247f368ea9f75427b53b7065e94b0db.zip gcc-ce6b9ebbe247f368ea9f75427b53b7065e94b0db.tar.gz gcc-ce6b9ebbe247f368ea9f75427b53b7065e94b0db.tar.bz2 |
re PR c++/39054 (ICE with invalid pseudo-dtor in template)
PR c++/39054
* parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
in BIT_NOT_EXPR.
From-SVN: r143876
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 5675e9b..138fe42 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -3896,7 +3896,9 @@ cp_parser_unqualified_id (cp_parser* parser, /* We couldn't find a type with this name, so just accept it and check for a match at instantiation time. */ type_decl = cp_parser_identifier (parser); - return build_nt (BIT_NOT_EXPR, type_decl); + if (type_decl != error_mark_node) + type_decl = build_nt (BIT_NOT_EXPR, type_decl); + return type_decl; } } /* If an error occurred, assume that the name of the |