decl.c (start_decl): Improve error location.
authorPaolo Carlini <paolo.carlini@oracle.com>
Tue, 15 Jan 2019 09:36:43 +0000 (09:36 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 15 Jan 2019 09:36:43 +0000 (09:36 +0000)
commit079a66801bfae16d282c9814266325569f91180d
tree3d7f4fc60e9207c6e391af734f1b77b06e0eafee
parent93aa3c4aca3647645cd5bce724f9d2126de4b5ea
decl.c (start_decl): Improve error location.

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

* decl.c (start_decl): Improve error location.
* decl2.c (grokfield): Likewise.

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

* g++.dg/diagnostic/typedef-initialized.C: New.

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

* decl.c (grokdeclarator): Move further up the location_t loc
declaration and use the location when building a TYPE_DECL for
a typedef name.
* decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in the error
about an ill-formed bit-field as typedef.

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

* g++.dg/diagnostic/bitfld3.C: New.

From-SVN: r267932
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/diagnostic/bitfld3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/diagnostic/typedef-initialized.C [new file with mode: 0644]