This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37560] bitfield not promoted to int
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2008 15:55:36 -0000
- Subject: [Bug c/37560] bitfield not promoted to int
- References: <bug-37560-8329@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from joseph at codesourcery dot com 2008-09-17 15:55 -------
Subject: Re: bitfield not promoted to int
On Wed, 17 Sep 2008, clemens at ladisch dot de wrote:
> According to the proposed TC in DR 315 ("If an int can represent all values of
> the original type (as restricted by the width, for a bit-field), the type is
> converted to an int;"),
That's part of the integer promotions, which are only applied in certain
contexts (and the operand of sizeof is not one of those contexts).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37560