decl.c (bad_specifiers): Add const location_t* parameter and use locations in error...
authorPaolo Carlini <paolo.carlini@oracle.com>
Sat, 23 Jun 2018 07:32:45 +0000 (07:32 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sat, 23 Jun 2018 07:32:45 +0000 (07:32 +0000)
commitbe68f3fa0f47e42f436a574e733ea709a83c6312
treebc4528f34d36534d8e448b2148346f52c00b1616
parent9f8a749e915a1bbafc8bdbfcf3b8342d3db58cb2
decl.c (bad_specifiers): Add const location_t* parameter and use locations in error messages about...

/cp
2018-06-23  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (bad_specifiers): Add const location_t* parameter and
use locations in error messages about 'inline' and 'virtual'.
(mark_inline_variable): Add location_t parameter and use it in
error_at and pedwarn messages.
(grokdeclarator): Use declspecs->locations[ds_constexpr],
declspecs->locations[ds_concept], declspecs->locations[ds_virtual],
declspecs->locations[ds_inline] in many error messages; adjust
bad_specifiers and mark_inline_variable calls.
(grokvardecl): Use declspecs->locations[ds_concept] in error message.

/testsuite
2018-06-23  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/concepts/locations1.C: New.
* g++.dg/cpp0x/locations1.C: Likewise.
* g++.dg/cpp1z/inline-var2.C: Test locations too.
* g++.dg/cpp1z/inline-var3.C: Likewise.

From-SVN: r261982
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/concepts/locations1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/locations1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/inline-var2.C
gcc/testsuite/g++.dg/cpp1z/inline-var3.C