Commit ce6b9ebb by Jason Merrill Committed by Jason Merrill

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
parent e0079468
2009-02-02 Jason Merrill <jason@redhat.com>
PR c++/39054
* parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
in BIT_NOT_EXPR.
2009-02-01 Paolo Carlini <paolo.carlini@oracle.com> 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/39053 PR c++/39053
......
...@@ -3896,7 +3896,9 @@ cp_parser_unqualified_id (cp_parser* parser, ...@@ -3896,7 +3896,9 @@ cp_parser_unqualified_id (cp_parser* parser,
/* We couldn't find a type with this name, so just accept /* We couldn't find a type with this name, so just accept
it and check for a match at instantiation time. */ it and check for a match at instantiation time. */
type_decl = cp_parser_identifier (parser); 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 /* If an error occurred, assume that the name of the
......
2009-02-02 Jason Merrill <jason@redhat.com>
PR c++/39054
* g++.dg/parse/dtor14.C: New test.
2009-02-02 Jakub Jelinek <jakub@redhat.com> 2009-02-02 Jakub Jelinek <jakub@redhat.com>
* lib/target-supports.exp * lib/target-supports.exp
......
// PR c++/39054
struct A {};
template<typename> void foo()
{
A().~int(); // { dg-error "expected" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment