diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2006-05-06 00:32:27 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2006-05-06 00:32:27 +0000 |
commit | 57b529596a083ba3e972a5b452e00b030a6592f5 (patch) | |
tree | 9fd1a5e47d13e2110df16f1bb4c9a5083d405a7a /gcc/cp | |
parent | 6af455d7120a3a8235b8e75f60596d31b3af9817 (diff) | |
download | gcc-57b529596a083ba3e972a5b452e00b030a6592f5.zip gcc-57b529596a083ba3e972a5b452e00b030a6592f5.tar.gz gcc-57b529596a083ba3e972a5b452e00b030a6592f5.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c24ed2a..31e40de 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 7d3bd3a..3eeb837 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -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; |