We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 651d8d1 commit 82a7ec6Copy full SHA for 82a7ec6
regression/goto-instrument/bitfield_naming/main.c
@@ -0,0 +1,18 @@
1
+typedef struct {
2
+ unsigned char b11 : 1;
3
+ unsigned char b22 : 1;
4
+ unsigned char b34 : 2;
5
+ unsigned char b58 : 4;
6
+} bf_t;
7
+
8
+typedef union {
9
+ unsigned char val;
10
+ bf_t bf;
11
+} union_bf_t;
12
13
+int main(void)
14
+{
15
+ union_bf_t bf;
16
+ bf.bf.b11 = 1;
17
+ return 0;
18
+}
regression/goto-instrument/bitfield_naming/test.desc
@@ -0,0 +1,15 @@
+CORE
+main.c
+--show-goto-functions --json-ui
+^EXIT=0$
+^SIGNAL=0$
+BF1\{U8\}\$U8\$\'b11\'
+BF1\{U8\}\$U8\$\'b22\'
+BF2\{U8\}\$U8\$\'b34\'
+BF4\{U8\}\$U8\$\'b58\'
+--
+Checks that type2name generates the right names for structs containing bitfields,
+in particular including the width of bitfield fields.
0 commit comments