This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25552] [4.0/4.1/4.2 regression] Invalid destructor name accepted in friend declaration
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jan 2006 11:56:02 -0000
- Subject: [Bug c++/25552] [4.0/4.1/4.2 regression] Invalid destructor name accepted in friend declaration
- References: <bug-25552-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from reichelt at gcc dot gnu dot org 2006-01-24 11:56 -------
Subject: Bug 25552
Author: reichelt
Date: Tue Jan 24 11:55:58 2006
New Revision: 110168
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110168
Log:
PR c++/25552
* parser.c (cp_parser_unqualified_id): Check that destructor name
and scope match.
* call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
Adjust comment. Return early if possible.
Use same_type_p to compare types.
* typeck.c (lookup_destructor): Adjust call to check_dtor_name.
* g++.dg/parse/dtor8.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/parse/dtor8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25552