re PR c++/14136 (double error message for typename used as destructor declarator)

PR c++/14136
	* parser.c (cp_parser_unqualified_id): Do not issue error message
	for typedef-name as destructor declarator when performing an
	uncommitted tentative parse.

From-SVN: r92859
This commit is contained in:
Volker Reichelt 2005-01-03 17:03:00 +00:00 committed by Volker Reichelt
parent 7db6be6f9b
commit 33a697020b
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
PR c++/14136
* parser.c (cp_parser_unqualified_id): Do not issue error message
for typedef-name as destructor declarator when performing an
uncommitted tentative parse.
2005-01-01 Steven Bosscher <stevenb@suse.de>
PR middle-end/17544

View File

@ -3255,7 +3255,8 @@ cp_parser_unqualified_id (cp_parser* parser,
identifier in the declarator for a destructor declaration. */
if (declarator_p
&& !DECL_IMPLICIT_TYPEDEF_P (type_decl)
&& !DECL_SELF_REFERENCE_P (type_decl))
&& !DECL_SELF_REFERENCE_P (type_decl)
&& !cp_parser_uncommitted_to_tentative_parse_p (parser))
error ("typedef-name %qD used as destructor declarator",
type_decl);