This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 10/10] Compress short ranges into source_location
- From: Dodji Seketeli <dodji at seketeli dot org>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 04 Nov 2015 21:42:03 +0100
- Subject: Re: [PATCH 10/10] Compress short ranges into source_location
- Authentication-results: sourceware.org; auth=none
- References: <1442957171-22904-1-git-send-email-dmalcolm at redhat dot com> <1445632918-29617-1-git-send-email-dmalcolm at redhat dot com> <1445632918-29617-11-git-send-email-dmalcolm at redhat dot com>
[...]
> diff --git a/libcpp/line-map.c b/libcpp/line-map.c
[...]
> +
> + /* Any ordinary locations ought to be "pure" at this point: no
> + compressed ranges. */
> + linemap_assert (locus < RESERVED_LOCATION_COUNT
> + || locus >= LINE_MAP_MAX_LOCATION_WITH_COLS
> + || locus >= LINEMAPS_MACRO_LOWEST_LOCATION (set)
> + || pure_location_p (set, locus));
Just for my own education, why aren't the tests
locus < RESERVED_LOCATION_COUNT
|| locus >= LINE_MAP_MAX_LOCATION_WITH_COLS
|| locus >= LINEMAPS_MACRO_LOWEST_LOCATION (set)
not part of pure_location_p() ? I mean, would it make sense to say that
a locus that that satisfies that condition is pure?
By the way, I like this great piece of code of yours, kudos!
Cheers,
--
Dodji