This is the mail archive of the
mailing list for the GCC project.
Re: Patch: C FE and column numbers
- From: Daniel Jacobowitz <drow at false dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Oct 2007 16:46:59 -0400
- Subject: Re: Patch: C FE and column numbers
- References: <firstname.lastname@example.org>
On Tue, Oct 30, 2007 at 01:46:19PM -0600, Tom Tromey wrote:
> However, there is one exception, which is that a function definition
> is given the location of the opening brace of the function's body.
> This is pre-existing code; I left it as-is on the theory that it gives
> a better experience in the debugger. This means that a function has
> one location while parsing the "header" and then another once the body
> is seen. This is a bit odd (and resulted in the patch to the test
> suite), but IMO is still clear and maintainable -- so I kept it.
As long as the line number for the prologue is associated with the
opening brace (which makes some sense), it seems to me that the
function name is a better place for the function's location. As long
as it's the copy of the name in the definition, of course!