[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Re: [PATCH 10/10] Compress short ranges into source_location
From:       Dodji Seketeli <dodji () seketeli ! org>
Date:       2015-11-04 20:42:03
Message-ID: 86oaf9a44k.fsf () seketeli ! org
[Download RAW message or body]

[...]

> 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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic