PR preprocessor/69664: fix rich_location::override_column
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Feb 2016 17:33:45 +0000 (17:33 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Feb 2016 17:33:45 +0000 (17:33 +0000)
commit86e0b129b4e7018bf7ca98a589d162aa4d0a4b76
tree9fcd123fd85a32e3a218356b240e6888a8a295fa
parentdac01e13c6706b484d3ccd451b72c95710986038
PR preprocessor/69664: fix rich_location::override_column

gcc/testsuite/ChangeLog:
PR preprocessor/69664
* gcc.dg/cpp/trad/comment-2.c: Add expected column number.
* gcc.dg/cpp/warn-comments.c: Likewise.

libcpp/ChangeLog:
PR preprocessor/69664
* errors.c (cpp_diagnostic_with_line): Only call
rich_location::override_column if the column is non-zero.
* line-map.c (rich_location::override_column): Update columns
within m_ranges[0].  Add assertions to verify that doing so is
sane.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233223 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/cpp/trad/comment-2.c
gcc/testsuite/gcc.dg/cpp/warn-comments.c
libcpp/ChangeLog
libcpp/errors.c
libcpp/line-map.c