This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH]: name lookup fix
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: 17 Jul 2003 10:09:32 -0700
- Subject: Re: [C++ PATCH]: name lookup fix
- Organization: CodeSourcery, LLC
- References: <3F1696AE.30100@codesourcery.com>
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