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]

sizeof(Bit Field) doesn't give any error


(gdb) ptype mBitField
type = struct tBitField {
     unsigned int f1 : 1;
     unsigned int f2 : 7;
}
(gdb) print sizeof(mBitField.f1)
$2 = 4

This should give error saying sizeof operator doesn't work for bit field.


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