This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 04/22] Reimplement diagnostic_show_locus, introducing rich_location classes
- From: Michael Matz <matz at suse dot de>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 Sep 2015 16:07:59 +0200 (CEST)
- Subject: Re: [PATCH 04/22] Reimplement diagnostic_show_locus, introducing rich_location classes
- Authentication-results: sourceware.org; auth=none
- References: <1441916913-11547-1-git-send-email-dmalcolm at redhat dot com> <1441916913-11547-5-git-send-email-dmalcolm at redhat dot com>
Hi,
On Thu, 10 Sep 2015, David Malcolm wrote:
> +/* A range of source locations.
> +
> + Ranges are half-open:
> + m_start is the first location within the range, whereas
> + m_finish is the first location *after* the range.
I think you eventually decided that they are closed, not half-open, at
least this:
> + static source_range from_location (source_location loc)
> + {
> + source_range result;
> + result.m_start = loc;
> + result.m_finish = loc;
and this:
> +/* Ranges are closed
> + m_start is the first location within the range, and
> + m_finish is the last location within the range. */
suggest so :)
Ciao,
Michael.