This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

Re: sizeof(Bit Field) doesn't give any error


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


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