This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Improve locinfo in the C FE (PR c/59940)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Jason Merrill <jason at redhat dot com>
- Date: Wed, 29 Jan 2014 21:19:35 +0000
- Subject: Re: [C PATCH] Improve locinfo in the C FE (PR c/59940)
- Authentication-results: sourceware.org; auth=none
- References: <20140129194127 dot GE8907 at redhat dot com>
On Wed, 29 Jan 2014, Marek Polacek wrote:
> Finally I managed to get this patch into regression-free shape. It
> should improve the column info for quite a lot of warnings, fixing
> PR59940 on the way. I had to add location_t to bunch of functions;
> SET_EXPR_LOCATION is of no use here - we're dealing with
> {VAR,PARM}_DECLs, which do not carry a locus info. Yet the function
> parameters are often called expr...
> I had to use expansion_point_location_if_in_system_header to
> get this working even with -ftrack-macro-expansion.
>
> Surely there are lots of other spots to fix, but this should be
> a step forward. Interestingly, adding locs here and there sometimes
> reminds me of a Whac-A-Mole game.
>
> Regtested/bootstrapped on x86_64-linux, ok for trunk?
The c/ and c-family/ changes are OK. (One of the other things left to fix
would be that it looks like convert_arguments could do with locations for
each argument, rather than just a single main location.)
--
Joseph S. Myers
joseph@codesourcery.com