diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-04 23:35:29 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-04 23:35:29 +0000 |
commit | 6d6bdc289851f7c10ecc3bf66301caf4983dd30e (patch) | |
tree | 33789715c13d21a2d6b517515a507f50dc9274ee /libcpp | |
parent | 9b11544d9d667cd7e183a57cac5b85f267bd9ee8 (diff) | |
download | gcc-6d6bdc289851f7c10ecc3bf66301caf4983dd30e.tar.gz |
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.
gcc/testsuite/ChangeLog:
2014-12-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
* gfortran.dg/line_length_5.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218407 138bc75d-0d04-0410-961f-82ee72b054a4
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 afb0f791f2c..e26c8c9b599 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 6a695ab0f1b..6675634fa97 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; |