* decl.c (cp_finish_decl): Compute the size of arrays declared in
templates, if their type is non-dependent.
PR c++/14616
* g++.dg/init/array13.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@79788
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-03-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/14616
+ * decl.c (cp_finish_decl): Compute the size of arrays declared in
+ templates, if their type is non-dependent.
+
2004-03-19 Mark Mitchell <mark@codesourcery.com>
* call.c (build_op_delete_call): Do not forget the placement
if (init && DECL_INITIAL (decl))
DECL_INITIAL (decl) = init;
+ if (TREE_CODE (decl) == VAR_DECL
+ && !DECL_PRETTY_FUNCTION_P (decl)
+ && !dependent_type_p (TREE_TYPE (decl)))
+ maybe_deduce_size_from_array_init (decl, init);
goto finish_end0;
}
+2004-03-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/14616
+ * g++.dg/init/array13.C: New test.
+
2004-03-20 Roger Sayle <roger@eyesopen.com>
PR target/13889
--- /dev/null
+template <typename DisjointSet>
+struct test_disjoint_set {
+ static void do_test()
+ {
+ unsigned int elts[]
+ = { 0, 1, 2, 3 };
+ const int N = sizeof(elts)/sizeof(*elts);
+ }
+};