diff options
author | lerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-23 15:01:45 +0000 |
---|---|---|
committer | lerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-23 15:01:45 +0000 |
commit | 9a9dd49f5a123f52330a91911fb56788afb6d7d9 (patch) | |
tree | 3b7908ca33480abbafc6964aab028e6c71ea364e /gcc/cp | |
parent | 52e91bc72a1267c959b15847cac8f067edb4736d (diff) | |
download | gcc-9a9dd49f5a123f52330a91911fb56788afb6d7d9.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67118 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 44375350950..238f56e2f9e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c86a1573c43..f775346b163 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -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); |