aboutsummaryrefslogtreecommitdiff
path: root/libcpp/line-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/line-map.c')
-rw-r--r--libcpp/line-map.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcpp/line-map.c b/libcpp/line-map.c
index 572d7f4..d6924eb 100644
--- a/libcpp/line-map.c
+++ b/libcpp/line-map.c
@@ -764,7 +764,11 @@ linemap_line_start (line_maps *set, linenum_type to_line,
/* Locations of ordinary tokens are always lower than locations of
macro tokens. */
if (r >= LINE_MAP_MAX_LOCATION)
- return 0;
+ {
+ /* Remember we overflowed. */
+ set->highest_line = set->highest_location = LINE_MAP_MAX_LOCATION - 1;
+ return 0;
+ }
set->highest_line = r;
if (r > set->highest_location)