This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: sizeof(Bit Field) doesn't give any error
- From: Tom Tromey <tromey at redhat dot com>
- To: Abhijit Halder <abhijit dot k dot halder at gmail dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Mon, 03 Oct 2011 13:07:50 -0600
- Subject: Re: sizeof(Bit Field) doesn't give any error
- References: <CAOhZP9w_Qn0vVRNAaHbLRBm778iMyAr+pEbBOnhHZ3PqEpDuqQ@mail.gmail.com>
>>>>> "Abhijit" == Abhijit Halder <abhijit.k.halder@gmail.com> writes:
Abhijit> (gdb) ptype mBitField
Abhijit> type = struct tBitField {
Abhijit> unsigned int f1 : 1;
Abhijit> unsigned int f2 : 7;
Abhijit> }
Abhijit> (gdb) print sizeof(mBitField.f1)
Abhijit> $2 = 4
Abhijit> This should give error saying sizeof operator doesn't work for
Abhijit> bit field.
I think this is already in bugzilla, but if not, please file it.
That is the best place for bugs; on this list they just get forgotten.
Tom