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: [C++ Patch] Another bunch of location fixes


On Mon, Sep 16, 2019 at 5:22 AM Paolo Carlini <paolo.carlini@oracle.com> wrote:
>
> On 15/09/19 16:22, Jason Merrill wrote:
> > On 9/12/19 9:41 AM, Paolo Carlini wrote:
> >> +      if (!valid_array_size_p (dname
> >> +                   ? declarator->id_loc : input_location,
> >
> > Use the id_loc local variable?
>
> This diagnostic is inside the loop over declarator->declarator.
> Eventually, outside the loop, the id_loc local is updated to the final
> declarator->id_loc or input_location. Norrmally in the loop we use the
> current declarator->id_loc: what I tested seems more correct to me (we
> have to account for input_location too because valid_array_size_p,
> shared with the C front-end, wants a sound location)

OK.

Jason


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