decl.c (duplicate_decls): Use DECL_SOURCE_LOCATION in OPT_Wshadow warning_at.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 14 Jun 2018 17:49:21 +0000 (17:49 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 14 Jun 2018 17:49:21 +0000 (17:49 +0000)
commitd4d44753398f9b24a622b40c7a1d144a6a6c350c
tree73c7c44de846b441d8eefb17fc70e5dee81037bc
parente9ecac306b972a45e2a6a4385bdf2bdc7f7ed68c
decl.c (duplicate_decls): Use DECL_SOURCE_LOCATION in OPT_Wshadow warning_at.

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

* decl.c (duplicate_decls): Use DECL_SOURCE_LOCATION in
OPT_Wshadow warning_at.
(grokfndecl): Consistently use the location_t argument in
literal operator diagnostic messages.
(grokdeclarator): Use declspecs->locations[ds_storage_class]
in error_at call.
* decl2.c (finish_static_data_member_decl): Use DECL_SOURCE_LOCATION
in permerror call.

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

* g++.dg/other/static3.C: New.
* g++.dg/other/static4.C: Likewise.
* g++.dg/warn/Wshadow-15.C: Likewise.
* g++.dg/cpp0x/gnu_fext-numeric-literals.C: Test locations too.
* g++.dg/cpp0x/std_fext-numeric-literals.C: Likewise.
* g++.dg/cpp0x/std_fno-ext-numeric-literals.C: Likewise.
* g++.dg/cpp0x/udlit-args-neg.C: Likewise.
* g++.dg/cpp0x/udlit-clink-neg.C: Likewise.
* g++.dg/cpp0x/udlit-extern-c.C: Likewise.
* g++.dg/cpp0x/udlit-member-neg.C: Likewise.

From-SVN: r261601
14 files changed:
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C
gcc/testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C
gcc/testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C
gcc/testsuite/g++.dg/cpp0x/udlit-args-neg.C
gcc/testsuite/g++.dg/cpp0x/udlit-clink-neg.C
gcc/testsuite/g++.dg/cpp0x/udlit-extern-c.C
gcc/testsuite/g++.dg/cpp0x/udlit-member-neg.C
gcc/testsuite/g++.dg/other/static3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/other/static4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wshadow-15.C [new file with mode: 0644]