Re: [C PATCH] Better location info for function parameters (PR c/56724)

2014-05-27 Thread Marek Polacek
On Tue, May 27, 2014 at 01:35:16PM -0600, Jeff Law wrote: > On 05/26/14 08:01, Marek Polacek wrote: > >@@ -3114,7 +3120,8 @@ convert_arguments (location_t loc, vec > >arg_loc, tree typelist, > > > > if (type == error_mark_node || !COMPLETE_TYPE_P (type)) > > { > >- error ("t

Re: [C PATCH] Better location info for function parameters (PR c/56724)

2014-05-27 Thread Jeff Law
On 05/26/14 08:01, Marek Polacek wrote: This patch introduces $subject, so if the warning says "passing argument N of X", the caret points to actual argument and not to function decl. So e.g.: pr56724-2.c:23:17: warning: passing argument 3 of ‘foo_sc’ from incompatible pointer type foo_sc (

[C PATCH] Better location info for function parameters (PR c/56724)

2014-05-26 Thread Marek Polacek
This patch introduces $subject, so if the warning says "passing argument N of X", the caret points to actual argument and not to function decl. So e.g.: pr56724-2.c:23:17: warning: passing argument 3 of ‘foo_sc’ from incompatible pointer type foo_sc (1, 2, f); ^ pr56724-2.c:9: