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

Volker Reichelt reichelt@igpm.rwth-aachen.de
Mon Oct 17 19:07:00 GMT 2005


On 17 Oct, Nathan Sidwell wrote:
> Volker Reichelt wrote:
> 
>> Regards,
>> Volker
>> 
>> 
>> 2005-10-17  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
>> 
>> 	PR c++/22293
>> 	* decl.c (grokdeclarator): Reject unqualified destructors in
>> 	friend declarations.
> 
> ok.
> 
>> ! 		    error ("unqualified destructor %qD cannot be declared "
>> ! 			   "friend", id_declarator->u.id.unqualified_name);
> 
> Perhaps a better message would be 'destructor %qD must use a qualified name in 
> friend declaration'.  That tells the user rather more explicitly how to fix 
> their code.

Doesn't "must use a qualified name in friend declaration for destructor
%qD" sound better? Or "expected a qualified ..."?

> nathan
> 

Regards,
Volker




More information about the Gcc-patches mailing list