This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
sizeof(Bit Field) doesn't give any error
- From: Abhijit Halder <abhijit dot k dot halder at gmail dot com>
- To: "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Sun, 18 Sep 2011 19:16:49 +0530
- Subject: 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.