]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c/ChangeLog
C FE: use correct location range for static assertions
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 16 Dec 2015 17:25:45 +0000 (17:25 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 16 Dec 2015 17:25:45 +0000 (17:25 +0000)
commit8062bca66dc0acfaf7b5d2659ee5ca4381fea9e8
tree1ee547d74e7d3d0c1c961fb845833707dd113d75
parent040b0c97c4d2cccdc3f80f7ad81ceb88e6794744
C FE: use correct location range for static assertions

gcc/c/ChangeLog:
* c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
expression location, falling back on the first token location,
rather than always using the latter.

gcc/testsuite/ChangeLog:
* gcc.dg/diagnostic-range-static-assert.c: New test case.

From-SVN: r231704
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/diagnostic-range-static-assert.c [new file with mode: 0644]