mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-31 21:41:33 +08:00
re PR c++/27423 (ICE on default argument for void parameter)
PR c++/27423 * typeck.c (convert_for_initialization): Skip erroneous types. * g++.dg/other/void2.C: New test. From-SVN: r113571
This commit is contained in:
parent
6af455d712
commit
57b529596a
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
@ -6219,7 +6219,8 @@ convert_for_initialization (tree exp, tree type, tree rhs, int flags,
|
||||
&& 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;
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
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.
|
||||
|
||||
|
5
gcc/testsuite/g++.dg/other/void2.C
Normal file
5
gcc/testsuite/g++.dg/other/void2.C
Normal file
@ -0,0 +1,5 @@
|
||||
// PR c++/27423
|
||||
// { dg-do compile }
|
||||
|
||||
void foo(void = 0); // { dg-error "incomplete type|invalid use" }
|
||||
void bar() { foo(); }
|
Loading…
x
Reference in New Issue
Block a user