]> git.ipfire.org Git - thirdparty/gcc.git/commit
preprocessor: Fix column adjustment [PR 99446]
authorNathan Sidwell <nathan@acm.org>
Tue, 13 Apr 2021 12:03:19 +0000 (05:03 -0700)
committerNathan Sidwell <nathan@acm.org>
Tue, 13 Apr 2021 12:07:23 +0000 (05:07 -0700)
commit4acb3af3669db4ca79ffc97cd615fcea205bcccb
tree195554064da12db8edf29a3979c14006d5503afe
parentf6ba5d039f988babdd99b5cdfb4557c380e57d69
preprocessor: Fix column adjustment [PR 99446]

This ICE was because when adjusting a column offset we could advance
into a linemap for a different file.  We only checked the next line
map was not for a line further advanced in any file, forgetting that
it could be for an earlier line in a different file.  The testcase
needed adjusting as column 512 was unrepresentable, once that was
taken into consideration.

PR preprocessor/99446
libcpp/
* line-map.c (line-map.c): Do not advance to linemaps for
different files.
gcc/testsuite/
* g++.dg/diagnostic/pr72803.C: Adjust expected column.
gcc/testsuite/g++.dg/diagnostic/pr72803.C
libcpp/line-map.c