aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-26 22:57:27 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-26 22:57:27 +0100
commit05d6cb1a858151016dbd368fd8b0792f73423d19 (patch)
tree635c4e4e72fcee7a26baab3ee60c186fc36a56a5 /gcc/c-family
parent1f7ed00ebf23f881421f302e5371bd0957deb1ef (diff)
downloadgcc-05d6cb1a858151016dbd368fd8b0792f73423d19.zip
gcc-05d6cb1a858151016dbd368fd8b0792f73423d19.tar.gz
gcc-05d6cb1a858151016dbd368fd8b0792f73423d19.tar.bz2
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
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-attribs.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index a836858..8929217 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/61414
+ * c-attribs.c (handle_mode_attribute): Add mode attribute to
+ ENUMERAL_TYPEs.
+
2019-11-25 Joseph Myers <joseph@codesourcery.com>
PR c/91985
diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
index cc006f3..35388e8 100644
--- a/gcc/c-family/c-attribs.c
+++ b/gcc/c-family/c-attribs.c
@@ -1866,6 +1866,7 @@ handle_mode_attribute (tree *node, tree name, tree args,
typefm = make_signed_type (TYPE_PRECISION (typefm));
TREE_TYPE (typefm) = type;
}
+ *no_add_attrs = false;
}
else if (VECTOR_MODE_P (mode)
? TREE_CODE (type) != TREE_CODE (TREE_TYPE (typefm))