From 930b1f40d0f3b4ad09d916f2a6da33f9d20dfad9 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Fri, 18 Feb 2000 06:00:36 +0000 Subject: [PATCH] class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. * decl2.c (grokclassfn): Likewise. From-SVN: r32044 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/class.c | 4 +--- gcc/cp/decl2.c | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6b0a240c50a..50c06a03300 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2000-02-17 Mark Mitchell + * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT. + * decl2.c (grokclassfn): Likewise. + * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS. * decl2.c (lang_decode_option): Don't set default message length diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 2772d463789..f22319965b7 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -1428,10 +1428,8 @@ void add_method (type, fields, method) tree type, *fields, method; { - /* Setting the DECL_CONTEXT and DECL_VIRTUAL_CONTEXT - here is probably redundant. */ + /* Setting the DECL_CONTEXT here is probably redundant. */ DECL_CONTEXT (method) = type; - DECL_VIRTUAL_CONTEXT (method) = type; if (fields && *fields) *fields = build_overload (method, *fields); diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index ff973e80934..440cdcd86bd 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1012,9 +1012,7 @@ grokclassfn (ctype, function, flags, quals) } DECL_ARGUMENTS (function) = last_function_parms; - /* First approximations. */ DECL_CONTEXT (function) = ctype; - DECL_VIRTUAL_CONTEXT (function) = ctype; if (flags == DTOR_FLAG || DECL_CONSTRUCTOR_P (function)) maybe_retrofit_in_chrg (function); -- 2.30.2