This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix return in grokdeclarator
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 22 May 2006 11:10:05 +0200 (CEST)
- Subject: [patch] Fix return in grokdeclarator
My patch for PR 27398 tried to make sure that grokdeclarator always
returns error_mark_node on invalid decls. However, I missed one
instance where grokdeclarator still returns a NULL_TREE.
The following patch fixes that.
Bootstrapped and regtested on x86_64-unknown-linux-gnu.
Ok for mainline?
Regards,
Volker
:ADDPATCH C++:
2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
===================================================================
--- gcc/gcc/cp/decl.c (revision 113948)
+++ gcc/gcc/cp/decl.c (working copy)
@@ -8211,7 +8211,7 @@ grokdeclarator (const cp_declarator *declarator,
sfk,
funcdef_flag, template_count, in_namespace, attrlist);
if (decl == NULL_TREE)
- return decl;
+ return error_mark_node;
#if 0
/* This clobbers the attrs stored in `decl' from `attrlist'. */
/* The decl and setting of decl_attr is also turned off. */
===================================================================