decl.c (grokdeclarator): Use typespec_loc in error messages about 'auto' and trailing...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 17 Jan 2019 18:01:43 +0000 (18:01 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 17 Jan 2019 18:01:43 +0000 (18:01 +0000)
commit742b6dc476c544389f109b03d221262a4cc55aaf
tree8a9bf793a3e4ef87b404584cbf910e7a4dead16d
parentb9e03679808ef26ba9614d352f69a347df120265
decl.c (grokdeclarator): Use typespec_loc in error messages about 'auto' and trailing return type.

/cp
2019-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (grokdeclarator): Use typespec_loc in error messages
about 'auto' and trailing return type.

/testsuite
2019-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/cpp0x/auto52.C: Test locations too.
* g++.dg/cpp0x/trailing2.C: Likewise.
* g++.dg/cpp1y/auto-fn18.C: Likewise.
* g++.dg/cpp1y/auto-fn25.C: Likewise.
* g++.dg/cpp1y/auto-fn52.C: Likewise.
* g++.dg/cpp1y/auto-fn53.C: Likewise.
* g++.dg/cpp1y/auto-fn54.C: Likewise.

From-SVN: r268043
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/auto52.C
gcc/testsuite/g++.dg/cpp0x/trailing2.C
gcc/testsuite/g++.dg/cpp1y/auto-fn18.C
gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
gcc/testsuite/g++.dg/cpp1y/auto-fn52.C
gcc/testsuite/g++.dg/cpp1y/auto-fn53.C
gcc/testsuite/g++.dg/cpp1y/auto-fn54.C