From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26369 invoked by alias); 27 Nov 2004 02:31:21 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26359 invoked by uid 48); 27 Nov 2004 02:31:18 -0000 Date: Sat, 27 Nov 2004 02:31:00 -0000 Message-ID: <20041127023118.26357.qmail@sourceware.org> From: "reichelt at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040213054710.14136.pinskia@gcc.gnu.org> References: <20040213054710.14136.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/14136] [4.0 Regression] double error message for typename used as destructor declarator X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg03290.txt.bz2 List-Id: ------- Additional Comments From reichelt at gcc dot gnu dot org 2004-11-27 02:31 ------- The following patch fixes the error message for me. I haven't done bootstrapping and regtesting, though. Index: parser.c =================================================================== RCS file: /usr/local/gcc/CVS/gcc-cvs/gcc/gcc/cp/parser.c,v retrieving revision 1.276 diff -u -p -r1.276 parser.c --- parser.c 3 Nov 2004 02:48:37 -0000 1.276 +++ parser.c 27 Nov 2004 07:07:14 -0000 @@ -3234,7 +3234,8 @@ cp_parser_unqualified_id (cp_parser* par 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_committed_to_tentative_parse (parser)) error ("typedef-name %qD used as destructor declarator", type_decl); =================================================================== -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14136