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: Abhijit Halder <abhijit dot k dot halder at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Tue, 4 Oct 2011 10:50:35 +0530
- Subject: Re: sizeof(Bit Field) doesn't give any error
- References: <CAOhZP9w_Qn0vVRNAaHbLRBm778iMyAr+pEbBOnhHZ3PqEpDuqQ@mail.gmail.com> <m31uutuc55.fsf@fleche.redhat.com>
On Tue, Oct 4, 2011 at 12:37 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "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
>
Tom, I just have filed one.
Regards,
Abhijit Halder