re PR c++/29408 (parse error for valid code)
PR c++/29408 * parser.c (cp_parser_using_declaration): Stop parsing when something goes wrong with an access declaration. PR c++/29408 * g++.dg/parse/dtor12.C: New test. From-SVN: r117800
This commit is contained in:
parent
b4c74ba243
commit
2186444501
|
@ -1,5 +1,9 @@
|
|||
2006-10-16 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/29408
|
||||
* parser.c (cp_parser_using_declaration): Stop parsing when
|
||||
something goes wrong with an access declaration.
|
||||
|
||||
PR c++/29435
|
||||
* typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
|
||||
types when their sizes are required. Refine test for VLAs.
|
||||
|
|
|
@ -10681,6 +10681,12 @@ cp_parser_using_declaration (cp_parser* parser,
|
|||
if (!qscope)
|
||||
qscope = global_namespace;
|
||||
|
||||
if (access_declaration_p && cp_parser_error_occurred (parser))
|
||||
/* Something has already gone wrong; there's no need to parse
|
||||
further. Since an error has occurred, the return value of
|
||||
cp_parser_parse_definitely will be false, as required. */
|
||||
return cp_parser_parse_definitely (parser);
|
||||
|
||||
/* Parse the unqualified-id. */
|
||||
identifier = cp_parser_unqualified_id (parser,
|
||||
/*template_keyword_p=*/false,
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2006-10-16 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/29408
|
||||
* g++.dg/parse/dtor12.C: New test.
|
||||
|
||||
PR c++/29435
|
||||
* g++.dg/template/sizeof11.C: New test.
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// PR c++/29408
|
||||
|
||||
template <class T> class a
|
||||
{
|
||||
~a<T>();
|
||||
};
|
Loading…
Reference in New Issue