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. */
125 /* Fill alternating fields with all 1's and verify that none of the bits
126 "bleed over" to the other fields. */
152 /* Fill the unsigned fields with the maximum positive value and verify
153 that the values are printed correctly. */
155 /* Maximum positive values */
166 /* Fill the signed fields with the maximum positive value, then the maximally
167 negative value, then -1, and verify in each case that the values are
168 printed correctly. */
170 /* Maximum positive values */
177 /* Maximally negative values */
182 /* Extract bitfield value so that bitfield.exp can check if the target
183 understands signed bitfields. */
199 /* Bitfields at a non-zero offset in a containing structure. */
200 container
.one
.u3
= 5;
201 container
.two
.u3
= 3;
This page took 0.03429 seconds and 4 git commands to generate.