This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] use correct column info for function definitions
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Arnaud Charlet <charlet at adacore dot com>
- Cc: joseph at codesourcery dot com, gcc-patches at gcc dot gnu dot org, charlet at act-europe dot fr, tromey at redhat dot com
- Date: Tue, 9 Sep 2008 07:18:12 -0400
- Subject: Re: [patch] use correct column info for function definitions
- References: <20080908213706.GA7429@redhat.com> <20080909073734.GA49530@adacore.com>
On Tue, Sep 09, 2008 at 09:37:34AM +0200, Arnaud Charlet wrote:
> > In C, we are are using the opening brace of a function as the column
> > location for the function DECL. This is confusing for error messages,
> > though rumor has it, for debugging, we need the prologue to point to the
> > instruction after the opening brace-- hence the current behavior.
>
> Interesting. So I guess that not setting the DECL_LOCATION in c-parser.c
> any more is sufficient to have it set (earlier?) to the proper location ?
The original DECL_SOURCE_LOCATION of the function DECL has the correct
(function name) location, so no need to touch it.