diff options
author | Steve Ellcey <sje@cup.hp.com> | 2006-06-23 21:53:36 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2006-06-23 21:53:36 +0000 |
commit | e135a63713a7354959fc77958c3fb5f56ddbf3e6 (patch) | |
tree | 183a1afe70a9ef162076602664dc56f17385ea4f | |
parent | 5fc89bfdd7468927e0b3d5aabd5b73af60d9cebe (diff) | |
download | gcc-e135a63713a7354959fc77958c3fb5f56ddbf3e6.zip gcc-e135a63713a7354959fc77958c3fb5f56ddbf3e6.tar.gz gcc-e135a63713a7354959fc77958c3fb5f56ddbf3e6.tar.bz2 |
re PR c++/27019 (ICE with designated initializers)
PR c++/27019
* typeck2.c (process_init_constructor_array): Set ce->value on errors.
From-SVN: r114952
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/typeck2.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 76ed3a0..178b0af 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2006-06-23 Steve Ellcey <sje@cup.hp.com> + + PR c++/27019 + * typeck2.c (process_init_constructor_array): Set ce->value on errors. + 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de> PR c++/28112 diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 6ad4e83..bef448b 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -797,7 +797,10 @@ process_init_constructor_array (tree type, tree init) { gcc_assert (TREE_CODE (ce->index) == INTEGER_CST); if (compare_tree_int (ce->index, i) != 0) - sorry ("non-trivial designated initializers not supported"); + { + ce->value = error_mark_node; + sorry ("non-trivial designated initializers not supported"); + } } else ce->index = size_int (i); @@ -895,7 +898,10 @@ process_init_constructor_record (tree type, tree init) || TREE_CODE (ce->index) == IDENTIFIER_NODE); if (ce->index != field && ce->index != DECL_NAME (field)) - sorry ("non-trivial designated initializers not supported"); + { + ce->value = error_mark_node; + sorry ("non-trivial designated initializers not supported"); + } } gcc_assert (ce->value); |