This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/22293, ICE declaring destructor as friend
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 17 Oct 2005 10:41:00 -0700
- Subject: Re: [patch] Fix PR c++/22293, ICE declaring destructor as friend
- References: <tkrat.7fa4b9e81a11a303@igpm.rwth-aachen.de>
Volker Reichelt wrote:
> The following patch fixes a 4.0/4.1 regression: The C++ frontend
> segfaults in grokdeclarator in decl.c on invalid code like the following:
> ! if (!ctype)
> ! {
> ! error ("unqualified destructor %qD cannot be declared "
> ! "friend", id_declarator->u.id.unqualified_name);
> ! return error_mark_node;
> ! }
Add "gcc_assert (friendp)" before the error message, so that this
doens't get out of synch in future; OK with that change.
Thanks,
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304