re PR c++/92732 (Bit-field of scoped enumeration type cannot be initialized)
authorJakub Jelinek <jakub@redhat.com>
Tue, 3 Dec 2019 08:21:29 +0000 (09:21 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 3 Dec 2019 08:21:29 +0000 (09:21 +0100)
commit6fcb7ebb377f27c7f38780f95998ad7a148b7f5b
treea93883c53d737926c1a5f4b5d775d7adf5d3feed
parente0daa2c86b74364a8ae13fc8e3f4a06c48139719
re PR c++/92732 (Bit-field of scoped enumeration type cannot be initialized)

PR c++/92732
* typeck2.c (digest_nsdmi_init): For bitfields, use
DECL_BIT_FIELD_TYPE instead of TREE_TYPE.

* g++.dg/cpp2a/bitfield3.C: Don't expect narrowing conversion
warnings.
* g++.dg/cpp2a/bitfield4.C: New test.

From-SVN: r278923
gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp2a/bitfield3.C
gcc/testsuite/g++.dg/cpp2a/bitfield4.C [new file with mode: 0644]