diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-04 23:35:29 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2014-12-04 23:35:29 +0000 |
commit | b93c07227e9ce2ee03d1cdc5ae2250fef3b0c130 (patch) | |
tree | 33789715c13d21a2d6b517515a507f50dc9274ee /libcpp | |
parent | 97aa8bb6e20579f382357ffaa8f7233133fc1e7c (diff) | |
download | gcc-b93c07227e9ce2ee03d1cdc5ae2250fef3b0c130.zip gcc-b93c07227e9ce2ee03d1cdc5ae2250fef3b0c130.tar.gz gcc-b93c07227e9ce2ee03d1cdc5ae2250fef3b0c130.tar.bz2 |
line-map.c (linemap_position_for_loc_and_offset): Add new linemap_assert_fails.
libcpp/ChangeLog:
2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
* line-map.c (linemap_position_for_loc_and_offset): Add new
linemap_assert_fails.
gcc/fortran/ChangeLog:
2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
* scanner.c (gfc_next_char_literal): Use gfc_warning_now.
(load_file): Use the line length as the column hint for
linemap_line_start. Reserve a location for the highest column of
the line.
From-SVN: r218407
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 5 | ||||
-rw-r--r-- | libcpp/line-map.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index afb0f79..e26c8c9 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,8 @@ +2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org> + + * line-map.c (linemap_position_for_loc_and_offset): Add new + linemap_assert_fails. + 2014-12-02 Manuel López-Ibáñez <manu@gcc.gnu.org> * include/line-map.h (linemap_assert_fails): Declare. diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 6a695ab..6675634 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -678,7 +678,8 @@ linemap_position_for_loc_and_offset (struct line_maps *set, linemap_position_for_line_and_column (map, SOURCE_LINE (map, loc), offset); - if (linemap_assert_fails (map == linemap_lookup (set, r))) + if (linemap_assert_fails (r <= set->highest_location) + || linemap_assert_fails (map == linemap_lookup (set, r))) return loc; return r; |