aboutsummaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-04-19 10:07:35 +0200
committerRichard Biener <rguenther@suse.de>2021-04-19 14:43:39 +0200
commit2f422b550ff6351d312e6c81a00b488d9280bfff (patch)
tree542ef140376fcc25f42211d6a7afc8d24fd247ab /libcpp/line-map.c
parent3395dfc4da8ad1fccd346c62dfc9bd44b2b48c62 (diff)
downloadgcc-2f422b550ff6351d312e6c81a00b488d9280bfff.zip
gcc-2f422b550ff6351d312e6c81a00b488d9280bfff.tar.gz
gcc-2f422b550ff6351d312e6c81a00b488d9280bfff.tar.bz2
preprocessor/100142 - revert unwanted change in last commit
This reverts a s/column_offset/column/ change in the fix for PR99446. 2021-04-19 Richard Biener <rguenther@suse.de> PR preprocessor/100142 libcpp/ * line-map.c (linemap_position_for_loc_and_offset): Revert unintended s/column_offset/column/ change. gcc/testsuite/ * gcc.dg/pr100142.c: New testcase. * g++.dg/diagnostic/pr72803.C: Revert last change.
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 2f5e444..a03d676 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -982,7 +982,7 @@ linemap_position_for_loc_and_offset (line_maps *set,
the next line map of the set. Otherwise, we try to encode the
location in the next map. */
for (; map != LINEMAPS_LAST_ORDINARY_MAP (set)
- && (loc + (column << map->m_range_bits)
+ && (loc + (column_offset << map->m_range_bits)
>= MAP_START_LOCATION (map + 1)); map++)
/* If the next map is a different file, or starts in a higher line, we
cannot encode the location there. */