Commit 6af455d7 by Volker Reichelt Committed by Volker Reichelt

re PR c++/27422 (ICE with invalid function argument)

	PR c++/27422
	* typeck.c (convert_arguments): Return early on args with
	invalid types.

	* g++.dg/conversion/void1.C: New test.

From-SVN: r113568
parent cd4677cc
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27422
* typeck.c (convert_arguments): Return early on args with
invalid types.
2006-05-03 Aldy Hernandez <aldyh@redhat.com> 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
PR/21391 PR/21391
......
...@@ -2704,7 +2704,7 @@ convert_arguments (tree typelist, tree values, tree fndecl, int flags) ...@@ -2704,7 +2704,7 @@ convert_arguments (tree typelist, tree values, tree fndecl, int flags)
tree type = typetail ? TREE_VALUE (typetail) : 0; tree type = typetail ? TREE_VALUE (typetail) : 0;
tree val = TREE_VALUE (valtail); tree val = TREE_VALUE (valtail);
if (val == error_mark_node) if (val == error_mark_node || type == error_mark_node)
return error_mark_node; return error_mark_node;
if (type == void_type_node) if (type == void_type_node)
......
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27422
* g++.dg/conversion/void1.C: New test.
2006-05-03 Aldy Hernandez <aldyh@redhat.com> 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
PR/21391 PR/21391
// PR c++/27422
// { dg-do compile }
void foo(void i); // { dg-error "incomplete type|invalid use" }
void bar() { foo(0); }
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