aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-02-02 13:38:10 -0500
committerJason Merrill <jason@gcc.gnu.org>2009-02-02 13:38:10 -0500
commitce6b9ebbe247f368ea9f75427b53b7065e94b0db (patch)
tree9390a44a3be5716a9169876afd42340bb7397888 /gcc/cp/parser.c
parente007946898e3371d82dff0f9b0ec11af178be3f2 (diff)
downloadgcc-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.c4
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