[patch] Fix PR c++/27508: ICE on invalid destructor name

Mark Mitchell mark@codesourcery.com
Sun May 14 20:59:00 GMT 2006


Volker Reichelt wrote:

> 	PR c++/27508
> 	* call.c (check_dtor_name): Emit error if basetype is a NAMESPACE_DECL.

In general, if an error can be caught in the parser, we want to catch it
there.  We should try to make other routines "type-safe" in the sense
that if a parameter is supposed to be a _TYPE, then, the only values it
actually has are a _TYPE node or error_mark_node.  (This has been a
gradual change over the past several years; with the YACC parser, we had
no choice but to try to sort things out in the semantic analysis routines.)

So, here, we should never be passing a NAMESPACE_DECL as a type.
Instead, if SCOPE is a NAMESPACE_DECL, we should just issue an error in
the parser.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list