This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17170] -Wdefault-bitfield-sign
- From: "jsm at polyomino dot org dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2004 15:50:29 -0000
- Subject: [Bug c/17170] -Wdefault-bitfield-sign
- References: <20040824155045.17170.terra@gnome.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jsm at polyomino dot org dot uk 2004-08-31 15:50 -------
Subject: Re: -Wdefault-bitfield-sign
On Tue, 31 Aug 2004, terra at gnome dot org wrote:
> I did a crude grep-scan on a 2.4.x linux kernel and found ~50 1-bit bitfields
> that were signed by default. A previous scan on parts of Gnome revealed a
> similar number. In other words, that kind of code is quite common.
There were quite a few in GCC. I got rid of them as preliminary to
getting in the bit-field patch that gave them their proper 1-bit signed
type and so caused assignments of 1 to such bit-fields to give a warning
of overflow in the implicit conversion.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17170