This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR c++/28387: ICE with attribute on invalid declaration
- 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: Fri, 14 Jul 2006 16:50:52 -0700
- Subject: Re: [patch] Fix PR c++/28387: ICE with attribute on invalid declaration
- References: <tkrat.2c2a257cd094d8f2@igpm.rwth-aachen.de>
> 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