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: [PATCH 10/10] Compress short ranges into source_location


[...]

> 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


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