decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in error messages about bit-fields...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 7 Dec 2018 17:48:39 +0000 (17:48 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 7 Dec 2018 17:48:39 +0000 (17:48 +0000)
commitfee11e77e59bb08b695ca4fb356322a8214a03c2
treef24d1372131fa2548e34bf3e90ac769722bf308a
parent96e14fda0dca4d79479137844b4457305fad2c3f
decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in error messages about bit-fields with function type...

/cp
2018-12-07  Paolo Carlini  <paolo.carlini@oracle.com>

* decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in error messages
about bit-fields with function type, warn_if_not_aligned type, and
static bit-fields; avoid DECL_NAME for unnamed declarations.

/testsuite
2018-12-07  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/other/bitfield7.C: New.
* g++.dg/parse/bitfield8.C: Likewise.
* g++.dg/parse/bitfield9.C: Likewise.
* g++.dg/pr53037-4.C: Test the locations too.

From-SVN: r266900
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/bitfield7.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/bitfield8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/bitfield9.C [new file with mode: 0644]
gcc/testsuite/g++.dg/pr53037-4.C