* typeck2.c (process_init_constructor): Call complete_array_type.
PR c++/8149
* decl.c (make_typename_type): Issue errors about invalid results.
PR c++/8160
* g++.dg/template/complit1.C: New test.
PR c++/8149
* g++.dg/template/typename4.C: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58663
138bc75d-0d04-0410-961f-
82ee72b054a4
+2002-10-30 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/8160
+ * typeck2.c (process_init_constructor): Call complete_array_type.
+
+ PR c++/8149
+ * decl.c (make_typename_type): Issue errors about invalid results.
+
2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Core issue 287, PR c++/7639
t = lookup_field (context, name, 0, 1);
if (t)
{
+ if (TREE_CODE (t) != TYPE_DECL)
+ {
+ if (complain & tf_error)
+ error ("no type named `%#T' in `%#T'", name, context);
+ return error_mark_node;
+ }
+
if (complain & tf_parsing)
type_access_control (context, t);
else
return error_mark_node;
result = build (CONSTRUCTOR, type, NULL_TREE, nreverse (members));
+ if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type) == NULL_TREE)
+ complete_array_type (type, result, /*do_default=*/0);
if (init)
TREE_HAS_CONSTRUCTOR (result) = TREE_HAS_CONSTRUCTOR (init);
if (allconstant) TREE_CONSTANT (result) = 1;
+2002-10-30 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/8160
+ * g++.dg/template/complit1.C: New test.
+
+ PR c++/8149
+ * g++.dg/template/typename4.C: Likewise.
+
2002-10-30 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Core issue 287, PR c++/7639
--- /dev/null
+// { dg-options "" }
+
+template <int D> struct C {
+ int d[3];
+ C();
+};
+
+template<int D>
+C<D>::C() : d((int[]){1,2,3}) {};
+
+template class C<1>;
--- /dev/null
+struct B { template <typename U> struct C; };
+template <typename T> struct A { typedef typename T::C V; }; // { dg-error "" }
+void f () { A<B>::V p; } // { dg-error "" }