This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix PR c++/22293, ICE declaring destructor as friend


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]