Commit 19eda56d by Martin Liska Committed by Martin Liska

Fix min_location usage in line-map.c (PR preprocessor/90382).

2019-05-14  Martin Liska  <mliska@suse.cz>

	PR preprocessor/90382
	* line-map.c (first_map_in_common_1): Handle ADHOC
	locations.

From-SVN: r271163
parent e6fc8353
2019-05-14 Martin Liska <mliska@suse.cz>
PR preprocessor/90382
* line-map.c (first_map_in_common_1): Handle ADHOC
locations.
2019-05-14 Martin Liska <mliska@suse.cz>
PR preprocessor/90382
* include/line-map.h (get_data_from_adhoc_loc): Add const to
the first argument.
(get_location_from_adhoc_loc): Likewise.
......
......@@ -1251,8 +1251,13 @@ first_map_in_common_1 (struct line_maps *set,
location_t *loc1)
{
location_t l0 = *loc0, l1 = *loc1;
const struct line_map *map0 = linemap_lookup (set, l0),
*map1 = linemap_lookup (set, l1);
const struct line_map *map0 = linemap_lookup (set, l0);
if (IS_ADHOC_LOC (l0))
l0 = get_location_from_adhoc_loc (set, l0);
const struct line_map *map1 = linemap_lookup (set, l1);
if (IS_ADHOC_LOC (l1))
l1 = get_location_from_adhoc_loc (set, l1);
while (linemap_macro_expansion_map_p (map0)
&& linemap_macro_expansion_map_p (map1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment