Commit 43b26a01 by Kriang Lerdsuwanakij Committed by Kriang Lerdsuwanakij

re PR c++/10682 (chokes on a typedef for an enum inside a class template)

	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
parent d3971161
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
......
......@@ -5500,7 +5500,7 @@ instantiate_class_template (type)
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.
......
// { 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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment