This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/41793] [4.3/4.4/4.5 Regression] About Long long bit field
- From: "jsm28 at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Oct 2009 12:50:57 -0000
- Subject: [Bug c/41793] [4.3/4.4/4.5 Regression] About Long long bit field
- References: <bug-41793-17793@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jsm28 at gcc dot gnu dot org 2009-10-22 12:50 -------
Please follow the bug reporting instructions
http://gcc.gnu.org/bugs/
when reporting bugs. They tell you to use -Wall, which would have shown
that your code has undefined behavior:
t.c:11:9: warning: format '%llx' expects type 'long long unsigned int', but
argument 2 has type 'long long unsigned int:40'
C bit-fields in GCC follow DR#120 and some other DRs, whereby
'long long unsigned int:40' is an integer type, is not promoted because
it is wider than int, and can have arithmetic carried out on it which is
40-bit modulo arithmetic.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41793