This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] PR c/7490
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Philippe Trebuchet <Philippe dot Trebuchet at sophia dot inria dot fr>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org, ebotcazou at libertysurf dot fr
- Date: 10 Dec 2002 03:04:00 +0100
- Subject: Re: [Patch] PR c/7490
- Organization: Integrable Solutions
- References: <200211261349.gAQDnJrZ019890@charybde.inria.fr><20021126181907.GD29756@redhat.com> <3DF4D48D.EA939ED@sophia.inria.fr><m3ptsb3xe2.fsf@uniton.integrable-solutions.net><3DF54A3E.6F50F9B4@sophia.inria.fr>
Philippe Trebuchet <Philippe.Trebuchet@sophia.inria.fr> writes:
| Gabriel Dos Reis wrote:
| >
| > Philippe Trebuchet <Philippe.Trebuchet@sophia.inria.fr> writes:
| >
| [...]
|
| > I think this isn't the right approach. In essence, what you're trying
| > to do is in no way different from what we do for names used in
| > class-definitions in cc1plus:
| >
| > (1) record potential nested fuunctions that need some processing
| > at the end of the binding level
| > (2) at the end of the scope check to see whether those functions
| > recorded in (1) meet the semantics requirements.
| >
| > Forget about RTL.
| >
| -one other in c-decl.c where I check for undefined auto nested functions
| in finish_function. I do it perhaps awkwardly, I run across all local
| names and check each local declaration.
The point in my previous message is that you don't have to check every
local declaration. By the time you see the declaration, you know
whether you'll have to check semantic restrictions. You don't have to
forget about that information in the first place and later redo a
chain to re-acquire that information.
-- Gaby