Commit 92777ce4 by Nathan Sidwell Committed by Nathan Sidwell

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
parent 15af0d40
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
......
......@@ -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
......
......@@ -723,7 +723,6 @@ int
yylex ()
{
int yychr;
tree trrr = NULL_TREE;
int old_looking_for_typename = 0;
timevar_push (TV_LEX);
......
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