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]

[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.  */
===================================================================



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