aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index ea4cfb2..ee9bf77 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2012-12-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/42315
+ * decl.c (maybe_deduce_size_from_array_init): Don't change the
+ variable type.
+
2012-12-13 Jakub Jelinek <jakub@redhat.com>
PR c++/55652
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index cdda2f4..64bd4b5 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -4834,14 +4834,12 @@ maybe_deduce_size_from_array_init (tree decl, tree init)
if (failure == 1)
{
error ("initializer fails to determine size of %qD", decl);
- TREE_TYPE (decl) = error_mark_node;
}
else if (failure == 2)
{
if (do_default)
{
error ("array size missing in %qD", decl);
- TREE_TYPE (decl) = error_mark_node;
}
/* If a `static' var's size isn't known, make it extern as
well as static, so it does not get allocated. If it's not
@@ -4853,7 +4851,6 @@ maybe_deduce_size_from_array_init (tree decl, tree init)
else if (failure == 3)
{
error ("zero-size array %qD", decl);
- TREE_TYPE (decl) = error_mark_node;
}
}