/cp
commitc3336d50e9b9a3ee22c72b9ec2c9556434accad3
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Jun 2018 07:32:45 +0000 (23 07:32 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 23 Jun 2018 07:32:45 +0000 (23 07:32 +0000)
treebc4528f34d36534d8e448b2148346f52c00b1616
parent36b6cd49c52f91281b4eaed13619c5f50d7c235d
/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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261982 138bc75d-0d04-0410-961f-82ee72b054a4
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