This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix debug info of nested inline functions
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Joel Brobecker <brobecker at adacore dot com>
- Date: Mon, 14 May 2012 22:17:34 +0200
- Subject: Re: [patch] Fix debug info of nested inline functions
- References: <201203022129.30464.ebotcazou@adacore.com> <201205141754.07630.ebotcazou@adacore.com> <4FB1379F.8070407@redhat.com>
> 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?
Because we want to generate an abstract instance of the nested function within
the abstract instance of the parent function. If we wait for the definition of
the nested function, and it's out-of-line, we attach the out-of-line instance
to the abstract parent, which is the source of the problem.
--
Eric Botcazou