1 /* Test program to test bit field operations */
3 /* For non-ANSI compilers, use plain ints for the signed bit fields. However,
4 whether they actually end up signed or not is implementation defined, so
5 this may cause some tests to fail. But at least we can still compile
6 the test program and run the tests... */
8 #if !defined(__STDC__) && !defined(__cplusplus)
72 /* This is used by bitfields.exp to determine if the target understands
78 /* For each member, set that member to 1, allow gdb to verify that the
79 member (and only that member) is 1, and then reset it back to 0. */
121 /* Fill alternating fields with all 1's and verify that none of the bits
122 "bleed over" to the other fields. */
148 /* Fill the unsigned fields with the maximum positive value and verify
149 that the values are printed correctly. */
151 /* Maximum positive values */
162 /* Fill the signed fields with the maximum positive value, then the maximally
163 negative value, then -1, and verify in each case that the values are
164 printed correctly. */
166 /* Maximum positive values */
173 /* Maximally negative values */
178 /* Extract bitfield value so that bitfield.exp can check if the target
179 understands signed bitfields. */
195 /* Bitfields at a non-zero offset in a containing structure. */
196 container
.one
.u3
= 5;
197 container
.two
.u3
= 3;
This page took 0.035464 seconds and 4 git commands to generate.