This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH]: name lookup fix


On Thu, 2003-07-17 at 05:29, Nathan Sidwell wrote:
> Hi,
> this patch fixes a name lookup issue. In a template definition, when 'i'
> refers to a field of a non-dependent base, the expression is non-dependent,
> and should not be looked up again at instantiation time.
> 
> booted & tested on i686-pc-linux-gnu, ok?

How does this work if the non-static data member is a member of the
template class?  For example:

  template <typename T>
  struct S { int i; void f() {  i = 3; }  };

Here, the way I read your code, we would build a COMPONENT_REF using the
FIELD_DECL for S<T>::i.  Does tsubst_copy know how to deal with that in
the COMPONENT_REF case of tsubst_copy_and_build?

-- 
Mark Mitchell <mark@codesourcery.com>
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]