* typeck.c (convert_for_initialization): Skip erroneous types.
* g++.dg/other/void2.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113571
138bc75d-0d04-0410-961f-
82ee72b054a4
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27423
+ * typeck.c (convert_for_initialization): Skip erroneous types.
+
PR c++/27422
* typeck.c (convert_arguments): Return early on args with
invalid types.
&& codel != REFERENCE_TYPE)
rhs = TREE_OPERAND (rhs, 0);
- if (rhs == error_mark_node
+ if (type == error_mark_node
+ || rhs == error_mark_node
|| (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node))
return error_mark_node;
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
+ PR c++/27423
+ * g++.dg/other/void2.C: New test.
+
PR c++/27422
* g++.dg/conversion/void1.C: New test.
--- /dev/null
+// PR c++/27423
+// { dg-do compile }
+
+void foo(void = 0); // { dg-error "incomplete type|invalid use" }
+void bar() { foo(); }