From: Nathan Sidwell Date: Fri, 6 Oct 2000 09:12:44 +0000 (+0000) Subject: pt.c (lookup_template_class): Set current access for enum. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92777ce4598caa5b17d916e7b0d8bad2fa7a950a;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index cea08bdb58c..ef328907259 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2000-10-06 Nathan Sidwell + + * 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 * semantics.c (genrtl_finish_function): Don't init or check diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 171250e5757..7c12f9c597a 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 56a3deed86b..110fdcaeb23 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);