Commit f1f66b42 by Lee Millward Committed by Lee Millward

re PR c/27953 (ICE with invalid function definitions)

	PR c/27953
	* c-decl.c (store_parm_decls_oldstyle): Robustify
        * gcc.dg/pr27953.c: New test.

From-SVN: r119446
parent cc0faf9d
2006-12-02 Lee Millward <lee.millward@codesourcery.com>
PR c/27953
* c-decl.c (store_parm_decls_oldstyle): Robustify.
2006-11-30 Jan Hubicka <jh@suse.cz> 2006-11-30 Jan Hubicka <jh@suse.cz>
Uros Bizjak <ubizjak@gmail.com> Uros Bizjak <ubizjak@gmail.com>
......
...@@ -6482,8 +6482,8 @@ store_parm_decls_oldstyle (tree fndecl, const struct c_arg_info *arg_info) ...@@ -6482,8 +6482,8 @@ store_parm_decls_oldstyle (tree fndecl, const struct c_arg_info *arg_info)
tree type; tree type;
for (parm = DECL_ARGUMENTS (fndecl), for (parm = DECL_ARGUMENTS (fndecl),
type = current_function_prototype_arg_types; type = current_function_prototype_arg_types;
parm || (type && (TYPE_MAIN_VARIANT (TREE_VALUE (type)) parm || (type && TREE_VALUE (type) != error_mark_node
!= void_type_node)); && (TYPE_MAIN_VARIANT (TREE_VALUE (type)) != void_type_node));
parm = TREE_CHAIN (parm), type = TREE_CHAIN (type)) parm = TREE_CHAIN (parm), type = TREE_CHAIN (type))
{ {
if (parm == 0 || type == 0 if (parm == 0 || type == 0
......
2006-12-02 Lee Millward <lee.millward@codesourcery.com>
PR c/27953
* gcc.dg/pr27953.c: New test.
2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/30022 PR c++/30022
/* PR c/27953 */
void foo(struct A a) {} /* { dg-error "parameter list|definition|incomplete type" } */
void foo() {} /* { dg-error "redefinition" }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment