PR c++/10682
* pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
check for implicitly created typedef to an enum.
* g++.dg/template/instantiate4.C: New test.
From-SVN: r67118
+2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/10682
+ * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
+ check for implicitly created typedef to an enum.
+
2003-05-21 Jason Merrill <jason@redhat.com>
* init.c (build_vec_delete): Copy the address into a temporary
CLASSTYPE_NESTED_UTDS case above. */
if (!(TREE_CODE (r) == TYPE_DECL
&& TREE_CODE (TREE_TYPE (r)) == ENUMERAL_TYPE
- && TYPE_CONTEXT (TREE_TYPE (r)) == type))
+ && DECL_ARTIFICIAL (r)))
{
set_current_access_from_decl (r);
finish_member_declaration (r);
+2003-05-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/10682
+ * g++.dg/template/instantiate4.C: New test.
+
2003-05-22 Roger Sayle <roger@eyesopen.com>
* gcc.c-torture/execute/ieee/inf-2.c: New test case.
--- /dev/null
+// { dg-do compile }
+
+// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
+
+// PR c++/10682: Typedef to enum template instantiation logic.
+
+template <typename T>
+struct Foo {
+ enum E {a,b,c};
+ typedef E EE;
+};
+
+void Baz(Foo<int>::EE x);