1 /* This checks if enums needing 8 bit but only having positive
2 values are correctly zero extended (instead of sign extended)
3 when stored into/loaded from a 8 bit bit-field of enum type (which
4 itself is implementation defined, so isn't necessarily supported by all
7 SOME_CODE
= 148, /* has bit 7 set, and hence all further enum values as well */
8 LAST_AND_UNUSED_TREE_CODE
10 typedef union tree_node
*tree
;
13 union tree_node
*chain
;
14 union tree_node
*type
;
15 enum tree_code code
: 8;
16 unsigned side_effects_flag
: 1;
20 struct tree_common common
;
23 C_DUMMY_TREE_CODE
= LAST_AND_UNUSED_TREE_CODE
,
27 enum cplus_tree_code
{
28 CP_DUMMY_TREE_CODE
= LAST_C_TREE_CODE
,
33 extern int printf(const char *, ...);
36 int convert_like_real (tree convs
)
38 switch (((enum tree_code
) (convs
)->common
.code
))
40 case AMBIG_CONV
: /* This has bit 7 set, which must not be the sign
41 bit in tree_common.code, i.e. the bitfield must
42 be somehow marked unsigned. */
47 printf("unsigned enum bit-fields broken\n");
53 union tree_node convs
;
55 convs
.common
.code
= AMBIG_CONV
;
56 convert_like_real (&convs
);