public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/41794] New: About Long long bit field
@ 2009-10-22 9:22 shenrfen at gmail dot com
2009-10-22 9:33 ` [Bug c/41794] " schwab at linux-m68k dot org
0 siblings, 1 reply; 2+ messages in thread
From: shenrfen at gmail dot com @ 2009-10-22 9:22 UTC (permalink / raw)
To: gcc-bugs
Test case:
struct s
{
unsigned long long a:2;
unsigned long long b:40;
unsigned long long c:22;
};
int main()
{
struct s t = {1, 2, 3};
printf("0x%llx\n",(t.b-8));
}
The output of gcc42 is 0xfffffffffa (which is yield to be 40bits)
Why not 0xfffffffffffffffa (It should be 64bits)
--
Summary: About Long long bit field
Product: gcc
Version: 4.2.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: shenrfen at gmail dot com
GCC build triplet: x86
GCC host triplet: x86
GCC target triplet: x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41794
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/41794] About Long long bit field
2009-10-22 9:22 [Bug c/41794] New: About Long long bit field shenrfen at gmail dot com
@ 2009-10-22 9:33 ` schwab at linux-m68k dot org
0 siblings, 0 replies; 2+ messages in thread
From: schwab at linux-m68k dot org @ 2009-10-22 9:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from schwab at linux-m68k dot org 2009-10-22 09:32 -------
*** This bug has been marked as a duplicate of 41793 ***
--
schwab at linux-m68k dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41794
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-22 9:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-22 9:22 [Bug c/41794] New: About Long long bit field shenrfen at gmail dot com
2009-10-22 9:33 ` [Bug c/41794] " schwab at linux-m68k dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).