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