This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] Fix lookup in typedefs of the currently open class (PR c++/33516)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Nov 2007 15:11:52 -0400
- Subject: Re: [C++ PATCH] Fix lookup in typedefs of the currently open class (PR c++/33516)
- References: <20071031205735.GT5451@devserv.devel.redhat.com> <472A208C.firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Nov 01, 2007 at 02:53:00PM -0400, Jason Merrill wrote:
> Jakub Jelinek wrote:
> >+ if (!COMPLETE_TYPE_P (new_scope)
> >+ && TYPE_MAIN_VARIANT (new_scope) != new_scope
> >+ && currently_open_class (new_scope))
> >+ new_scope = TYPE_MAIN_VARIANT (new_scope);
> It seems unnecessary to have so many tests. Specifically the second
> test doesn't do anything. And I might move the !COMPLETE_TYPE_P test
> inside currently_open_class.
Both tests were there just to avoid the more expensive currently_open_class
call. But if you think it is not too expensive and can be called
unconditionally, so be it.