]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c/68473: sanitize source range-printing within certain macro expansions
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Dec 2015 22:27:45 +0000 (22:27 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 Dec 2015 22:27:45 +0000 (22:27 +0000)
commit56d3d7815dc02ca43ce252606aec1b6afbc75570
tree9fd9e89b95791c5e7485bf3333fe0566fa41274c
parent7b4b11d3bd6a295a74062583f8fc0bf2d5161005
PR c/68473: sanitize source range-printing within certain macro expansions

gcc/ChangeLog:
PR c/68473
* diagnostic-show-locus.c (layout::layout): Make loc_range const.
Sanitize the layout_range against ranges that finish before they
start.

gcc/testsuite/ChangeLog:
PR c/68473
* gcc.dg/plugin/diagnostic-test-expressions-1.c (fminl): New decl.
(TEST_EQ): New macro.
(test_macro): New function.
* gcc.target/i386/pr68473-1.c: New test case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231919 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/diagnostic-show-locus.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/plugin/diagnostic-test-expressions-1.c
gcc/testsuite/gcc.target/i386/pr68473-1.c [new file with mode: 0644]