aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/pt.c7
-rw-r--r--gcc/cp/spew.c1
3 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cea08bd..ef32890 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * pt.c (lookup_template_class): Set current access for enum.
+ (tsubst_enum): Set file & line for enum decl.
+
+ * spew.c (yylex): Remove unused variable.
+
2000-10-05 Richard Henderson <rth@cygnus.com>
* semantics.c (genrtl_finish_function): Don't init or check
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
diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c
index 56a3dee..110fdca 100644
--- a/gcc/cp/spew.c
+++ b/gcc/cp/spew.c
@@ -723,7 +723,6 @@ int
yylex ()
{
int yychr;
- tree trrr = NULL_TREE;
int old_looking_for_typename = 0;
timevar_push (TV_LEX);