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] Fix debug info of nested inline functions


On 05/14/2012 12:49 PM, Jason Merrill wrote:
On 05/14/2012 11:54 AM, Eric Botcazou wrote:
Hmm, why isn't current_function_decl == decl when we're trying to emit
the abstract instance of a nested function?

Because it is emitted when the first instance of the parent function is seen, and in this case current_function_decl == parent_decl.

Our normal procedure is to generate a declaration when we see a function in its enclosing context, and then fix it up later when we see the definition. Why not handle this similarly?

I suppose the way we handle nested functions, we generate debug info for the nested function before that for the enclosing function, but then we should attach the (abstract) nested function to the enclosing function in process_scope_var.


Jason


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