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: C FE and column numbers


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!

-- 
Daniel Jacobowitz
CodeSourcery


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