[Bug c++/61414] enum class bitfield size-checking needs a separate warning flag controlling it
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 20 17:01:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414
--- Comment #24 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Dec 20 17:00:02 2019
New Revision: 279654
URL: https://gcc.gnu.org/viewcvs?rev=279654&root=gcc&view=rev
Log:
Backported from mainline
2019-11-26 Jakub Jelinek <jakub@redhat.com>
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.
Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/enum38.C
Modified:
branches/gcc-9-branch/gcc/c-family/ChangeLog
branches/gcc-9-branch/gcc/c-family/c-attribs.c
branches/gcc-9-branch/gcc/cp/ChangeLog
branches/gcc-9-branch/gcc/cp/class.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/cpp0x/enum23.C
More information about the Gcc-bugs
mailing list