diff options
| author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2005-01-03 17:03:00 +0000 |
|---|---|---|
| committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2005-01-03 17:03:00 +0000 |
| commit | 33a697020b45656ce109a30a900a6f76fb2a503c (patch) | |
| tree | 875d91ca8edcc5108d8a6edcc4cf68918159086d /gcc/cp/parser.c | |
| parent | 7db6be6f9b93a20c6b8183592ef954a4a00f3fa3 (diff) | |
| download | gcc-33a697020b45656ce109a30a900a6f76fb2a503c.zip gcc-33a697020b45656ce109a30a900a6f76fb2a503c.tar.gz gcc-33a697020b45656ce109a30a900a6f76fb2a503c.tar.bz2 | |
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
Diffstat (limited to 'gcc/cp/parser.c')
| -rw-r--r-- | gcc/cp/parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index ccc6473..139d3de 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -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); |
