decl.c (has_designator_problem): Use cp_expr_loc_or_input_loc in error_at.
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 10 Sep 2019 08:12:28 +0000 (08:12 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 10 Sep 2019 08:12:28 +0000 (08:12 +0000)
commitb08bcba5dc1775618e67f6486240188260084122
tree63cf4ce79d85ce717807eee9a1fa0d04b1e46242
parenta360a359b784acdb53e20cbb85576b4b3662703a
decl.c (has_designator_problem): Use cp_expr_loc_or_input_loc in error_at.

/cp
2019-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (has_designator_problem): Use cp_expr_loc_or_input_loc
in error_at.
(build_enumerator): Likewise.
(cp_finish_decl): Use DECL_SOURCE_LOCATION.
(grokdeclarator): Use id_loc in two error_at; change errror
message about constinit together constexpr to use two ranges.

/testsuite
2019-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/cpp0x/enum29.C: Test location(s) too.
* g++.dg/cpp0x/lambda/lambda-ice10.C: Likewise.
* g++.dg/cpp2a/constinit3.C: Likewise.
* g++.dg/ext/desig4.C: Likewise.
* g++.dg/ext/label10.C: Likewise.
* g++.old-deja/g++.other/dtor3.C: Likewise.

From-SVN: r275585
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/enum29.C
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C
gcc/testsuite/g++.dg/cpp2a/constinit3.C
gcc/testsuite/g++.dg/ext/desig4.C
gcc/testsuite/g++.dg/ext/label10.C
gcc/testsuite/g++.old-deja/g++.other/dtor3.C