aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-10-06 09:12:44 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-10-06 09:12:44 +0000
commit92777ce4598caa5b17d916e7b0d8bad2fa7a950a (patch)
tree764c26a6d5b0fd2a6c60e2278a2693ecbe57aa31 /gcc/cp/pt.c
parent15af0d401a107a3c80981612a5e3711c179a6735 (diff)
downloadgcc-92777ce4598caa5b17d916e7b0d8bad2fa7a950a.zip
gcc-92777ce4598caa5b17d916e7b0d8bad2fa7a950a.tar.gz
gcc-92777ce4598caa5b17d916e7b0d8bad2fa7a950a.tar.bz2
pt.c (lookup_template_class): Set current access for enum.
* pt.c (lookup_template_class): Set current access for enum. (tsubst_enum): Set file & line for enum decl. * spew.c (yylex): Remove unused variable. From-SVN: r36755
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 171250e..7c12f9c 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3965,7 +3965,10 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
if (TREE_CODE (template_type) == ENUMERAL_TYPE)
{
if (!is_partial_instantiation)
- t = start_enum (TYPE_IDENTIFIER (template_type));
+ {
+ set_current_access_from_decl (TYPE_NAME (template_type));
+ t = start_enum (TYPE_IDENTIFIER (template_type));
+ }
else
/* We don't want to call start_enum for this type, since
the values for the enumeration constants may involve
@@ -9941,6 +9944,8 @@ tsubst_enum (tag, newtag, args)
}
finish_enum (newtag);
+ DECL_SOURCE_LINE (TYPE_NAME (newtag)) = DECL_SOURCE_LINE (TYPE_NAME (tag));
+ DECL_SOURCE_FILE (TYPE_NAME (newtag)) = DECL_SOURCE_FILE (TYPE_NAME (tag));
}
/* DECL is a FUNCTION_DECL that is a template specialization. Return