PR c/68473: sanitize source range-printing within certain macro expansions
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 22 Dec 2015 22:27:45 +0000 (22:27 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Tue, 22 Dec 2015 22:27:45 +0000 (22:27 +0000)
commit070856cc13576073d3cc33ba60c2453a6be35351
tree9fd9e89b95791c5e7485bf3333fe0566fa41274c
parent329590d70441f5300eafa7340845a65359b1c46b
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.

From-SVN: r231919
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]