This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Better location info for function parameters (PR c/56724)
- From: Marek Polacek <polacek at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Tue, 27 May 2014 22:06:10 +0200
- Subject: Re: [C PATCH] Better location info for function parameters (PR c/56724)
- Authentication-results: sourceware.org; auth=none
- References: <20140526140129 dot GJ17600 at redhat dot com> <5384E8F4 dot 90703 at redhat dot com>
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<location_t> arg_loc, tree typelist,
> >
> > if (type == error_mark_node || !COMPLETE_TYPE_P (type))
> > {
> >- error ("type of formal parameter %d is incomplete", parmnum + 1);
> >+ error_at (ploc, "type of formal parameter %d is incomplete",
> >+ argnum);
> Is the change from parnum+1 to argnum really correct? Note that they are
> not equal for certain ObjC situations.
Thanks for catching this, I think the change is indeed bogus. I failed to
notice that in ObjC with selectors the argnum gets decreased.
> The rest is OK. If you're sure the parnum+1 -> argnum change is really
> correct, then the whole thing is good. If you change that back to parnum+1
> after further review, then that is pre-approved.
Thanks for the review. I'll change it back to parmnum + 1 and
install.
Marek