re PR c++/61414 (enum class bitfield size-checking needs a separate warning flag...
authorJakub Jelinek <jakub@redhat.com>
Tue, 26 Nov 2019 21:57:27 +0000 (22:57 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 26 Nov 2019 21:57:27 +0000 (22:57 +0100)
commit05d6cb1a858151016dbd368fd8b0792f73423d19
tree635c4e4e72fcee7a26baab3ee60c186fc36a56a5
parent1f7ed00ebf23f881421f302e5371bd0957deb1ef
re PR c++/61414 (enum class bitfield size-checking needs a separate warning flag controlling it)

PR c++/61414
* c-attribs.c (handle_mode_attribute): Add mode attribute to
ENUMERAL_TYPEs.

* class.c (enum_to_min_precision): New hash_map.
(enum_min_precision): New function.
(check_bitfield_decl): Use it.

* g++.dg/cpp0x/enum23.C: Remove xfail.
* g++.dg/cpp0x/enum28.C: New test.

From-SVN: r278736
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/enum23.C
gcc/testsuite/g++.dg/cpp0x/enum38.C [new file with mode: 0644]