re PR c++/14136 (double error message for typename used as destructor declarator)
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>
Mon, 3 Jan 2005 17:03:00 +0000 (17:03 +0000)
committerVolker Reichelt <reichelt@gcc.gnu.org>
Mon, 3 Jan 2005 17:03:00 +0000 (17:03 +0000)
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

gcc/cp/ChangeLog
gcc/cp/parser.c

index b061e69646a0404bff97f16dbeacbe99d0473bc0..6127a7edbfcda472d1efab8d89c363a6d3ca1f21 100644 (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
index ccc64732afe9547ada0f5b36401f29c8d31b3d72..139d3de5264dae31eea68ea7d97de95674e29fc2 100644 (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);