This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/41793] [4.3/4.4/4.5 Regression] About Long long bit field



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]