decl.c (maybe_deduce_size_from_array_init): Use DECL_SOURCE_LOCATION in error_at.
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 8 Jun 2016 19:31:55 +0000 (19:31 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 8 Jun 2016 19:31:55 +0000 (19:31 +0000)
commitc8a715894d9192f33d526b5c2b058ce937303b79
tree0c2b709c39db8197464e104e86d12be5a7e3f8c7
parent44a845ca0e592ca187fbab07ac9e055b20fb11cc
decl.c (maybe_deduce_size_from_array_init): Use DECL_SOURCE_LOCATION in error_at.

/cp
2016-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (maybe_deduce_size_from_array_init): Use
DECL_SOURCE_LOCATION in error_at.
(layout_var_decl): Likewise.
(check_array_initializer): Likewise.
(check_initializer): Likewise.
(duplicate_decls, check_elaborated_type_specifier): Tidy.

/testsuite
2016-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/init/array42.C: New.
* g++.dg/init/array43.C: Likewise.
* g++.dg/init/array44.C: Likewise.
* g++.dg/init/array45.C: Likewise.
* g++.dg/cpp0x/constexpr-ice10.C: Test column number too.
* g++.dg/cpp0x/constexpr-incomplete1.C: Likewise.
* g++.dg/cpp1y/auto-fn27.C: Likewise.
* g++.dg/gomp/pr35751.C: Likewise.
* g++.dg/init/array23.C: Likewise.
* g++.dg/init/brace2.C: Likewise.
* g++.dg/init/brace6.C: Likewise.

From-SVN: r237240
14 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/constexpr-ice10.C
gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete1.C
gcc/testsuite/g++.dg/cpp1y/auto-fn27.C
gcc/testsuite/g++.dg/gomp/pr35751.C
gcc/testsuite/g++.dg/init/array23.C
gcc/testsuite/g++.dg/init/array42.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/array43.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/array44.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/array45.C [new file with mode: 0644]
gcc/testsuite/g++.dg/init/brace2.C
gcc/testsuite/g++.dg/init/brace6.C