aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-03-26 11:16:45 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-03-26 06:16:45 -0500
commit18922a6bca05d3b30755004d57f3c37a2af049e4 (patch)
tree910067166f351282735a8c8df998840c0c0a77fa /gcc
parent812f205146d174f71073ac23f51d362c1bc11575 (diff)
downloadgcc-18922a6bca05d3b30755004d57f3c37a2af049e4.zip
gcc-18922a6bca05d3b30755004d57f3c37a2af049e4.tar.gz
gcc-18922a6bca05d3b30755004d57f3c37a2af049e4.tar.bz2
decl.c (grokdeclarator): Remove const and volatile from type after setting constp and volatilep.
* decl.c (grokdeclarator): Remove const and volatile from type after setting constp and volatilep. * class.c (finish_struct_1): Don't warn about bool bitfield larger than one bit. From-SVN: r18843
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/class.c3
-rw-r--r--gcc/cp/decl.c1
3 files changed, 11 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6ca4d8d..a25b441 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (grokdeclarator): Remove const and volatile from type after
+ setting constp and volatilep.
+
+ * class.c (finish_struct_1): Don't warn about bool bitfield larger
+ than one bit.
+
Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
* pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 337c090..7440a8a7 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -3499,7 +3499,8 @@ finish_struct_1 (t, warn_anon)
cp_error_at (" in declaration of `%D'", x);
}
else if (width > TYPE_PRECISION (TREE_TYPE (x))
- && TREE_CODE (TREE_TYPE (x)) != ENUMERAL_TYPE)
+ && TREE_CODE (TREE_TYPE (x)) != ENUMERAL_TYPE
+ && TREE_CODE (TREE_TYPE (x)) != BOOLEAN_TYPE)
{
cp_warning_at ("width of `%D' exceeds its type", x);
}
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 5a3664e..15fa6fb 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8397,6 +8397,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
constp = !! RIDBIT_SETP (RID_CONST, specbits) + TYPE_READONLY (type);
volatilep = !! RIDBIT_SETP (RID_VOLATILE, specbits) + TYPE_VOLATILE (type);
+ type = TYPE_MAIN_VARIANT (type);
staticp = 0;
inlinep = !! RIDBIT_SETP (RID_INLINE, specbits);
virtualp = RIDBIT_SETP (RID_VIRTUAL, specbits);