class.c (check_bitfield_decl): In error message about non-integral type print the...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 6 Dec 2018 23:20:16 +0000 (23:20 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 6 Dec 2018 23:20:16 +0000 (23:20 +0000)
commit3c1eaf67e9a4a1a63ff26b24c4b1f9f1a7c58bc4
tree3bd4768e1ce9c05ec207274fe1aa85aee839810a
parentd7711adcd5226995063342631e1ce5c2ff055981
class.c (check_bitfield_decl): In error message about non-integral type print the type itself too.

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

* class.c (check_bitfield_decl): In error message about non-integral
type print the type itself too.
* decl.c (grokdeclarator): Do not ICE on unnamed bit-fields declared
friends; when calling build_decl for a FIELD_DECL possibly pass the
declarator->id_loc.

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

* g++.dg/parse/bitfield7.C: New.
* g++.dg/other/bitfield2.C: Check location and type.
* g++.dg/parse/bitfield1.C: Likewise.
* g++.dg/parse/bitfield2.C: Likewise.

From-SVN: r266876
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/bitfield2.C
gcc/testsuite/g++.dg/parse/bitfield1.C
gcc/testsuite/g++.dg/parse/bitfield2.C
gcc/testsuite/g++.dg/parse/bitfield7.C [new file with mode: 0644]