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: [Patch] PR c/7490


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


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