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++/28387: ICE with attribute on invalid declaration


> 2006-07-14  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
> 
> 	PR c++/28387
> 	* decl2.c (cplus_decl_attributes): Check for invalid decls.

OK, thanks.

> ===================================================================
> --- gcc/gcc/cp/decl2.c	(revision 115431)
> +++ gcc/gcc/cp/decl2.c	(working copy)
> @@ -997,7 +997,8 @@ cplus_decl_attributes (tree *decl, tree
>  void
>  cplus_decl_attributes (tree *decl, tree attributes, int flags)
>  {
> -  if (*decl == NULL_TREE || *decl == void_type_node)
> +  if (*decl == NULL_TREE || *decl == void_type_node
> +      || *decl == error_mark_node)
>      return;

This goofiness with void_type_node should really go at some point.  At
one point, parts of the compiler returned "void_type_node" to mean
"friend declaration", but that's just odd.

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


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