aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorLewis Hyatt <lhyatt@gmail.com>2022-07-07 13:59:27 -0400
committerLewis Hyatt <lhyatt@gmail.com>2022-07-08 09:43:33 -0400
commit2bd15617e73acf76207127e5580cd10b1fab91a5 (patch)
tree35be9178e2ae2b13bc5a7c6bf4ff695c2f2f565e /gcc/expr.cc
parent6da7f7c5ac03f85a753989712588511e5f56e73d (diff)
downloadgcc-2bd15617e73acf76207127e5580cd10b1fab91a5.zip
gcc-2bd15617e73acf76207127e5580cd10b1fab91a5.tar.gz
gcc-2bd15617e73acf76207127e5580cd10b1fab91a5.tar.bz2
diagnostics: Make line-ending logic consistent with libcpp [PR91733]
libcpp recognizes a lone \r as a valid line ending, so the infrastructure for retrieving source lines to be output in diagnostics needs to do the same. This patch fixes file_cache_slot::get_next_line() accordingly so that diagnostics display the correct part of the source when \r line endings are in use. gcc/ChangeLog: PR preprocessor/91733 * input.cc (find_end_of_line): New helper function. (file_cache_slot::get_next_line): Recognize \r as a line ending. * diagnostic-show-locus.cc (test_escaping_bytes_1): Adapt selftest since \r will now be interpreted as a line-ending. gcc/testsuite/ChangeLog: PR preprocessor/91733 * c-c++-common/pr91733.c: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions