}
break;
+ case ENTITY_COMPOUND_MEMBER:
+ print_type_ext(declaration->type, declaration->base.symbol, NULL);
+ if (entity->compound_member.bitfield) {
+ print_format(" : %u", entity->compound_member.bit_size);
+ }
+ break;
+
default:
print_type_ext(declaration->type, declaration->base.symbol, NULL);
break;
static entity_t **inner_functions;
static ir_node *ijmp_list;
static bool constant_folding;
-static bool initializer_use_bitfield_basetype;
static const entity_t *current_function_entity;
static ir_node *current_function_name;
return res;
}
-static ir_type *create_bitfield_type(bitfield_type_t *const type)
+static ir_type *create_bitfield_type(const entity_t *entity)
{
- type_t *base = skip_typeref(type->base_type);
+ assert(entity->kind == ENTITY_COMPOUND_MEMBER);
+ type_t *base = skip_typeref(entity->declaration.type);
assert(base->kind == TYPE_ATOMIC || base->kind == TYPE_ENUM);
ir_type *irbase = get_ir_type(base);
- unsigned size = type->bit_size;
+ unsigned bit_size = entity->compound_member.bit_size;
assert(!is_type_float(base));
if (is_type_signed(base)) {
- return get_signed_int_type_for_bit_size(irbase, size,
- (const type_t*) type);
+ return get_signed_int_type_for_bit_size(irbase, bit_size, base);
} else {
- return get_unsigned_int_type_for_bit_size(irbase, size,
- (const type_t*) type);
+ return get_unsigned_int_type_for_bit_size(irbase, bit_size, base);
}
}
ident *ident;
if (symbol == NULL) {
/* anonymous bitfield member, skip */
- if (entry_type->kind == TYPE_BITFIELD)
+ if (entry->compound_member.bitfield)
continue;
assert(entry_type->kind == TYPE_COMPOUND_STRUCT
|| entry_type->kind == TYPE_COMPOUND_UNION);
dbg_info *dbgi = get_dbg_info(&entry->base.source_position);
- ir_type *entry_irtype = get_ir_type(entry_type);
+ ir_type *entry_irtype;
+ if (entry->compound_member.bitfield) {
+ entry_irtype = create_bitfield_type(entry);
+ } else {
+ entry_irtype = get_ir_type(entry_type);
+ }
ir_entity *entity = new_d_entity(irtype, ident, entry_irtype, dbgi);
set_entity_offset(entity, entry->compound_member.offset);
case TYPE_ENUM:
firm_type = create_enum_type(&type->enumt);
break;
- case TYPE_BITFIELD:
- firm_type = create_bitfield_type(&type->bitfield);
- break;
case TYPE_TYPEOF:
case TYPE_TYPEDEF:
value = create_conv(dbgi, value, mode);
/* kill upper bits of value and shift to right position */
- int bitoffset = get_entity_offset_bits_remainder(entity);
- int bitsize = get_mode_size_bits(get_type_mode(entity_type));
-
+ int bitoffset = get_entity_offset_bits_remainder(entity);
+ int bitsize = get_mode_size_bits(get_type_mode(entity_type));
ir_tarval *mask = create_bitfield_mask(mode, 0, bitsize);
ir_node *mask_node = new_d_Const(dbgi, mask);
ir_node *value_masked = new_d_And(dbgi, value, mask_node, mode);
}
static ir_node *bitfield_extract_to_firm(const select_expression_t *expression,
- ir_node *addr)
+ ir_node *addr)
{
- dbg_info *dbgi = get_dbg_info(&expression->base.source_position);
- type_t *type = expression->base.type;
- ir_mode *mode = get_ir_mode_storage(type);
- ir_node *mem = get_store();
- ir_node *load = new_d_Load(dbgi, mem, addr, mode, cons_none);
- ir_node *load_mem = new_d_Proj(dbgi, load, mode_M, pn_Load_M);
- ir_node *load_res = new_d_Proj(dbgi, load, mode, pn_Load_res);
+ dbg_info *dbgi = get_dbg_info(&expression->base.source_position);
+ entity_t *entity = expression->compound_entry;
+ type_t *base_type = entity->declaration.type;
+ ir_mode *mode = get_ir_mode_storage(base_type);
+ ir_node *mem = get_store();
+ ir_node *load = new_d_Load(dbgi, mem, addr, mode, cons_none);
+ ir_node *load_mem = new_d_Proj(dbgi, load, mode_M, pn_Load_M);
+ ir_node *load_res = new_d_Proj(dbgi, load, mode, pn_Load_res);
- load_res = create_conv(dbgi, load_res, mode_int);
+ type_t *type = expression->base.type;
+ ir_mode *resmode = get_ir_mode_arithmetic(type);
+ unsigned res_size = get_mode_size_bits(resmode);
+ load_res = create_conv(dbgi, load_res, resmode);
set_store(load_mem);
/* kill upper bits */
assert(expression->compound_entry->kind == ENTITY_COMPOUND_MEMBER);
- ir_entity *entity = expression->compound_entry->compound_member.entity;
- int bitoffset = get_entity_offset_bits_remainder(entity);
- ir_type *entity_type = get_entity_type(entity);
- int bitsize = get_mode_size_bits(get_type_mode(entity_type));
- long shift_bitsl = machine_size - bitoffset - bitsize;
- assert(shift_bitsl >= 0);
- ir_tarval *tvl = new_tarval_from_long(shift_bitsl, mode_uint);
- ir_node *countl = new_d_Const(dbgi, tvl);
- ir_node *shiftl = new_d_Shl(dbgi, load_res, countl, mode_int);
-
- long shift_bitsr = bitoffset + shift_bitsl;
- assert(shift_bitsr <= (long) machine_size);
- ir_tarval *tvr = new_tarval_from_long(shift_bitsr, mode_uint);
- ir_node *countr = new_d_Const(dbgi, tvr);
+ int bitoffset = entity->compound_member.bit_offset;
+ int bitsize = entity->compound_member.bit_size;
+ unsigned shift_bitsl = res_size - bitoffset - bitsize;
+ ir_tarval *tvl = new_tarval_from_long((long)shift_bitsl, mode_uint);
+ ir_node *countl = new_d_Const(dbgi, tvl);
+ ir_node *shiftl = new_d_Shl(dbgi, load_res, countl, resmode);
+
+ unsigned shift_bitsr = bitoffset + shift_bitsl;
+ assert(shift_bitsr <= res_size);
+ ir_tarval *tvr = new_tarval_from_long((long)shift_bitsr, mode_uint);
+ ir_node *countr = new_d_Const(dbgi, tvr);
ir_node *shiftr;
if (mode_is_signed(mode)) {
- shiftr = new_d_Shrs(dbgi, shiftl, countr, mode_int);
+ shiftr = new_d_Shrs(dbgi, shiftl, countr, resmode);
} else {
- shiftr = new_d_Shr(dbgi, shiftl, countr, mode_int);
+ shiftr = new_d_Shr(dbgi, shiftl, countr, resmode);
}
- return create_conv(dbgi, shiftr, mode);
+ return create_conv(dbgi, shiftr, resmode);
}
/* make sure the selected compound type is constructed */
entity_t *entity = select->compound_entry;
assert(entity->kind == ENTITY_COMPOUND_MEMBER);
- if (entity->declaration.type->kind == TYPE_BITFIELD) {
+ if (entity->compound_member.bitfield) {
ir_entity *irentity = entity->compound_member.entity;
bool set_volatile
= select->base.type->base.qualifiers & TYPE_QUALIFIER_VOLATILE;
ir_node *value;
if (expression->kind == EXPR_SELECT &&
- expression->select.compound_entry->declaration.type->kind == TYPE_BITFIELD){
+ expression->select.compound_entry->compound_member.bitfield) {
construct_select_compound(&expression->select);
value = bitfield_extract_to_firm(&expression->select, addr);
} else {
(const expression_t*) expression);
type = skip_typeref(type);
- entity_t *entry = expression->compound_entry;
+ entity_t *entry = expression->compound_entry;
assert(entry->kind == ENTITY_COMPOUND_MEMBER);
- type_t *entry_type = skip_typeref(entry->declaration.type);
- if (entry_type->kind == TYPE_BITFIELD) {
+ if (entry->compound_member.bitfield) {
return bitfield_extract_to_firm(expression, addr);
}
case TYPE_COMPLEX: tc = complex_type_class; goto make_const;
case TYPE_IMAGINARY: tc = complex_type_class; goto make_const;
- case TYPE_BITFIELD: tc = integer_type_class; goto make_const;
case TYPE_ARRAY: /* gcc handles this as pointer */
case TYPE_FUNCTION: /* gcc handles this as pointer */
case TYPE_POINTER: tc = pointer_type_class; goto make_const;
}
type_t *type = initializer->value->base.type;
expression_t *expr = initializer->value;
- if (initializer_use_bitfield_basetype) {
- type_t *skipped = skip_typeref(type);
- if (skipped->kind == TYPE_BITFIELD) {
- /* remove the bitfield cast... */
- assert(expr->kind == EXPR_UNARY_CAST && expr->base.implicit);
- expr = expr->unary.value;
- type = skipped->bitfield.base_type;
- }
- }
ir_node *value = expression_to_firm(expr);
ir_mode *mode = get_ir_mode_storage(type);
value = create_conv(NULL, value, mode);
}
if (is_constant_initializer(initializer) == EXPR_CLASS_VARIABLE) {
- bool old_initializer_use_bitfield_basetype
- = initializer_use_bitfield_basetype;
- initializer_use_bitfield_basetype = true;
ir_initializer_t *irinitializer
= create_ir_initializer(initializer, type);
- initializer_use_bitfield_basetype
- = old_initializer_use_bitfield_basetype;
create_dynamic_initializer(irinitializer, dbgi, entity);
return;
declaration_t base;
il_size_t offset; /**< the offset of this member in the compound */
unsigned char bit_offset; /**< extra bit offset for bitfield members */
+ unsigned char bit_size; /**< bitsize for bitfield members */
+ bool bitfield : 1; /**< member is (part of) a bitfield */
bool read : 1;
bool address_taken : 1; /**< Set if the address of this
declaration was taken. */
case TYPE_TYPEDEF:
case TYPE_TYPEOF:
panic("typeref not resolved while manging?!?");
-
- case TYPE_BITFIELD:
- panic("no mangling for this type implemented yet");
}
panic("invalid type encountered while mangling");
}
*/
static type_t *promote_integer(type_t *type)
{
- if (type->kind == TYPE_BITFIELD)
- type = type->bitfield.base_type;
-
if (get_rank(type) < get_akind_rank(ATOMIC_TYPE_INT))
type = type_int;
return false;
}
assert(iter->kind == ENTITY_COMPOUND_MEMBER);
- if (used_in_offsetof) {
- type_t *real_type = skip_typeref(iter->declaration.type);
- if (real_type->kind == TYPE_BITFIELD) {
- errorf(&designator->source_position,
- "offsetof designator '%Y' must not specify bitfield",
- symbol);
- return false;
- }
+ if (used_in_offsetof && iter->compound_member.bitfield) {
+ errorf(&designator->source_position,
+ "offsetof designator '%Y' must not specify bitfield",
+ symbol);
+ return false;
}
top->type = orig_type;
POP_SCOPE();
}
-static type_t *make_bitfield_type(type_t *base_type, expression_t *size,
- source_position_t *source_position,
- const symbol_t *symbol)
-{
- type_t *type = allocate_type_zero(TYPE_BITFIELD);
-
- type->bitfield.base_type = base_type;
- type->bitfield.size_expression = size;
-
- il_size_t bit_size;
- type_t *skipped_type = skip_typeref(base_type);
- if (!is_type_integer(skipped_type)) {
- errorf(source_position, "bitfield base type '%T' is not an integer type", base_type);
- bit_size = 0;
- } else {
- bit_size = get_type_size(base_type) * 8;
- }
-
- if (is_constant_expression(size) == EXPR_CLASS_CONSTANT) {
- long v = fold_constant_to_int(size);
- const symbol_t *user_symbol = symbol == NULL ? sym_anonymous : symbol;
-
- if (v < 0) {
- errorf(source_position, "negative width in bit-field '%Y'",
- user_symbol);
- } else if (v == 0 && symbol != NULL) {
- errorf(source_position, "zero width for bit-field '%Y'",
- user_symbol);
- } else if (bit_size > 0 && (il_size_t)v > bit_size) {
- errorf(source_position, "width of '%Y' exceeds its type",
- user_symbol);
- } else {
- type->bitfield.bit_size = v;
- }
- }
-
- return type;
-}
-
static entity_t *find_compound_entry(compound_t *compound, symbol_t *symbol)
{
entity_t *iter = compound->members.entities;
type_t *entry_type = entry->declaration.type;
type_t *res_type = get_qualified_type(entry_type, qualifiers);
+ /* bitfields need special treatment */
+ if (entry->compound_member.bitfield) {
+ unsigned bit_size = entry->compound_member.bit_size;
+ /* if fewer bits than an int, convert to int (see §6.3.1.1) */
+ if (bit_size < get_atomic_type_size(ATOMIC_TYPE_INT) * BITS_PER_BYTE) {
+ res_type = type_int;
+ }
+ }
+
/* we always do the auto-type conversions; the & and sizeof parser contains
* code to revert this! */
select->base.type = automatic_type_conversion(res_type);
- if (res_type->kind == TYPE_BITFIELD) {
- select->base.type = res_type->bitfield.base_type;
- }
+
return select;
}
return NULL;
}
+static void parse_bitfield_member(entity_t *entity)
+{
+ eat(':');
+
+ expression_t *size = parse_constant_expression();
+ long size_long;
+
+ assert(entity->kind == ENTITY_COMPOUND_MEMBER);
+ type_t *type = entity->declaration.type;
+ if (!is_type_integer(skip_typeref(type))) {
+ errorf(HERE, "bitfield base type '%T' is not an integer type",
+ type);
+ }
+
+ if (is_constant_expression(size) != EXPR_CLASS_CONSTANT) {
+ /* error already reported by parse_constant_expression */
+ size_long = get_type_size(type) * 8;
+ } else {
+ size_long = fold_constant_to_int(size);
+
+ const symbol_t *symbol = entity->base.symbol;
+ const symbol_t *user_symbol
+ = symbol == NULL ? sym_anonymous : symbol;
+ unsigned bit_size = get_type_size(type) * 8;
+ if (size_long < 0) {
+ errorf(HERE, "negative width in bit-field '%Y'", user_symbol);
+ } else if (size_long == 0 && symbol != NULL) {
+ errorf(HERE, "zero width for bit-field '%Y'", user_symbol);
+ } else if (bit_size > 0 && (unsigned)size_long > bit_size) {
+ errorf(HERE, "width of bitfield '%Y' exceeds its type",
+ user_symbol);
+ } else {
+ /* hope that people don't invent crazy types with more bits
+ * than our struct can hold */
+ assert(size_long <
+ (1 << sizeof(entity->compound_member.bit_size)*8));
+ }
+ }
+
+ entity->compound_member.bitfield = true;
+ entity->compound_member.bit_size = (unsigned char)size_long;
+}
+
static void parse_compound_declarators(compound_t *compound,
const declaration_specifiers_t *specifiers)
{
entity_t *entity;
if (token.kind == ':') {
- source_position_t source_position = *HERE;
- next_token();
-
- type_t *base_type = specifiers->type;
- expression_t *size = parse_constant_expression();
+ /* anonymous bitfield */
+ type_t *type = specifiers->type;
+ entity_t *entity = allocate_entity_zero(ENTITY_COMPOUND_MEMBER,
+ NAMESPACE_NORMAL, NULL);
+ entity->base.source_position = *HERE;
+ entity->declaration.declared_storage_class = STORAGE_CLASS_NONE;
+ entity->declaration.storage_class = STORAGE_CLASS_NONE;
+ entity->declaration.type = type;
- type_t *type = make_bitfield_type(base_type, size,
- &source_position, NULL);
+ parse_bitfield_member(entity);
attribute_t *attributes = parse_attributes(NULL);
attribute_t **anchor = &attributes;
while (*anchor != NULL)
anchor = &(*anchor)->next;
*anchor = specifiers->attributes;
-
- entity = allocate_entity_zero(ENTITY_COMPOUND_MEMBER, NAMESPACE_NORMAL, NULL);
- entity->base.source_position = source_position;
- entity->declaration.declared_storage_class = STORAGE_CLASS_NONE;
- entity->declaration.storage_class = STORAGE_CLASS_NONE;
- entity->declaration.type = type;
- entity->declaration.attributes = attributes;
-
if (attributes != NULL) {
handle_entity_attributes(attributes, entity);
}
+ entity->declaration.attributes = attributes;
+
append_entity(&compound->members, entity);
} else {
entity = parse_declarator(specifiers,
}
if (token.kind == ':') {
- source_position_t source_position = *HERE;
- next_token();
- expression_t *size = parse_constant_expression();
-
- type_t *type = entity->declaration.type;
- type_t *bitfield_type = make_bitfield_type(type, size,
- &source_position, entity->base.symbol);
+ parse_bitfield_member(entity);
attribute_t *attributes = parse_attributes(NULL);
- entity->declaration.type = bitfield_type;
handle_entity_attributes(attributes, entity);
} else {
type_t *orig_type = entity->declaration.type;
entity_t *entity = expression->select.compound_entry;
assert(is_declaration(entity));
type_t *type = entity->declaration.type;
- return get_qualified_type(type,
- expression->base.type->base.qualifiers);
+ return get_qualified_type(type, expression->base.type->base.qualifiers);
}
case EXPR_UNARY_DEREFERENCE: {
return expr;
}
+static bool is_bitfield(const expression_t *expression)
+{
+ return expression->kind == EXPR_SELECT
+ && expression->select.compound_entry->compound_member.bitfield;
+}
+
static expression_t *parse_typeprop(expression_kind_t const kind)
{
expression_t *tp_expression = allocate_expression_zero(kind);
expression = parse_subexpression(PREC_UNARY);
typeprop_expression:
+ if (is_bitfield(expression)) {
+ char const* const what = kind == EXPR_SIZEOF ? "sizeof" : "alignof";
+ errorf(&tp_expression->base.source_position,
+ "operand of %s expression must not be a bitfield", what);
+ }
+
tp_expression->typeprop.tp_expression = expression;
orig_type = revert_automatic_type_conversion(expression);
} else {
wrong_type = "function";
}
- } else {
- if (is_type_incomplete(type))
- wrong_type = "incomplete";
}
- if (type->kind == TYPE_BITFIELD)
- wrong_type = "bitfield";
if (wrong_type != NULL) {
char const* const what = kind == EXPR_SIZEOF ? "sizeof" : "alignof";
if (!is_lvalue(value)) {
errorf(&expression->base.source_position, "'&' requires an lvalue");
}
- if (type->kind == TYPE_BITFIELD) {
+ if (is_bitfield(value)) {
errorf(&expression->base.source_position,
- "'&' not allowed on object with bitfield type '%T'",
- type);
+ "'&' not allowed on bitfield");
}
set_address_taken(value, false);
[TYPE_ATOMIC] = sizeof(atomic_type_t),
[TYPE_COMPLEX] = sizeof(complex_type_t),
[TYPE_IMAGINARY] = sizeof(imaginary_type_t),
- [TYPE_BITFIELD] = sizeof(bitfield_type_t),
[TYPE_COMPOUND_STRUCT] = sizeof(compound_type_t),
[TYPE_COMPOUND_UNION] = sizeof(compound_type_t),
[TYPE_ENUM] = sizeof(enum_type_t),
intern_print_type_post(type->element_type);
}
-/**
- * Prints the postfix part of a bitfield type.
- *
- * @param type The array type.
- */
-static void print_bitfield_type_post(const bitfield_type_t *type)
-{
- print_string(" : ");
- print_expression(type->size_expression);
- intern_print_type_post(type->base_type);
-}
-
/**
* Prints an enum definition.
*
case TYPE_REFERENCE:
print_reference_type_pre(&type->reference);
return;
- case TYPE_BITFIELD:
- intern_print_type_pre(type->bitfield.base_type);
- return;
case TYPE_ARRAY:
print_array_type_pre(&type->array);
return;
case TYPE_ARRAY:
print_array_type_post(&type->array);
return;
- case TYPE_BITFIELD:
- print_bitfield_type_post(&type->bitfield);
- return;
case TYPE_ERROR:
case TYPE_INVALID:
case TYPE_ATOMIC:
if (type->kind == TYPE_ENUM)
return true;
- if (type->kind == TYPE_BITFIELD)
- return true;
-
if (type->kind != TYPE_ATOMIC)
return false;
/* enum types are int for now */
if (type->kind == TYPE_ENUM)
return true;
- if (type->kind == TYPE_BITFIELD)
- return is_type_signed(type->bitfield.base_type);
-
if (type->kind != TYPE_ATOMIC)
return false;
assert(!is_typeref(type));
switch(type->kind) {
- case TYPE_BITFIELD:
case TYPE_ENUM:
return true;
case TYPE_ATOMIC:
case TYPE_IMAGINARY:
return type->imaginary.akind == ATOMIC_TYPE_VOID;
- case TYPE_BITFIELD:
case TYPE_FUNCTION:
case TYPE_POINTER:
case TYPE_REFERENCE:
case TYPE_COMPOUND_STRUCT:
case TYPE_COMPOUND_UNION: {
-
-
break;
}
case TYPE_ENUM:
/* TODO: not implemented */
break;
- case TYPE_BITFIELD:
- /* not sure if this makes sense or is even needed, implement it if you
- * really need it! */
- panic("type compatibility check for bitfield type");
-
case TYPE_ERROR:
/* Hmm, the error type should be compatible to all other types */
return true;
il_size_t element_size = get_type_size(type->array.element_type);
return type->array.size * element_size;
}
- case TYPE_BITFIELD:
- return 0;
case TYPE_TYPEDEF:
return get_type_size(type->typedeft.typedefe->type);
case TYPE_TYPEOF:
return 4;
case TYPE_ARRAY:
return get_type_alignment(type->array.element_type);
- case TYPE_BITFIELD:
- return 0;
case TYPE_TYPEDEF: {
il_alignment_t alignment
= get_type_alignment(type->typedeft.typedefe->type);
case TYPE_IMAGINARY:
case TYPE_REFERENCE:
case TYPE_POINTER:
- case TYPE_BITFIELD:
case TYPE_ARRAY:
return 0;
case TYPE_TYPEDEF: {
for (member = first; member != NULL; member = member->base.next) {
if (member->kind != ENTITY_COMPOUND_MEMBER)
continue;
-
- type_t *type = member->declaration.type;
- if (type->kind != TYPE_BITFIELD)
+ if (!member->compound_member.bitfield)
break;
- type_t *base_type = skip_typeref(type->bitfield.base_type);
+ type_t *base_type = member->declaration.type;
il_alignment_t base_alignment = get_type_alignment(base_type);
il_alignment_t alignment_mask = base_alignment-1;
if (base_alignment > alignment)
alignment = base_alignment;
- size_t bit_size = type->bitfield.bit_size;
+ size_t bit_size = member->compound_member.bit_size;
if (!packed) {
bit_offset += (offset & alignment_mask) * BITS_PER_BYTE;
offset &= ~alignment_mask;
continue;
}
- if (skipped->kind == TYPE_BITFIELD) {
+ if (entry->compound_member.bitfield) {
entry = pack_bitfield_members(&offset, &alignment,
compound->packed, entry);
continue;
return result;
}
-static unsigned hash_bitfield_type(const bitfield_type_t *type)
-{
- unsigned result = hash_ptr(type->base_type);
- result ^= 27172145;
-
- return result;
-}
-
static unsigned hash_type(const type_t *type)
{
unsigned hash = 0;
case TYPE_TYPEOF:
hash = hash_typeof_type(&type->typeoft);
break;
- case TYPE_BITFIELD:
- hash = hash_bitfield_type(&type->bitfield);
- break;
}
unsigned some_prime = 99991;
return true;
}
-static bool bitfield_types_equal(const bitfield_type_t *type1,
- const bitfield_type_t *type2)
-{
- if (type1->base_type != type2->base_type)
- return false;
- /* TODO: compare size expression */
- return false;
-}
-
static bool types_equal(const type_t *type1, const type_t *type2)
{
if (type1 == type2)
return typeof_types_equal(&type1->typeoft, &type2->typeoft);
case TYPE_TYPEDEF:
return typedef_types_equal(&type1->typedeft, &type2->typedeft);
- case TYPE_BITFIELD:
- return bitfield_types_equal(&type1->bitfield, &type2->bitfield);
}
abort();
TYPE_POINTER,
TYPE_REFERENCE,
TYPE_ARRAY,
- TYPE_BITFIELD,
TYPE_TYPEDEF,
TYPE_TYPEOF,
} type_kind_t;
type_t *resolved_type;
};
-struct bitfield_type_t {
- type_base_t base;
- type_t *base_type;
- expression_t *size_expression; /**< The expression for the bit size. */
- il_size_t bit_size; /**< Size of this bitfield in bits. */
-};
-
union type_t {
type_kind_t kind;
type_base_t base;
compound_type_t compound;
enum_type_t enumt;
typedef_type_t typedeft;
- bitfield_type_t bitfield;
typeof_type_t typeoft;
};
case TYPE_TYPEDEF:
panic("invalid type found");
case TYPE_ARRAY:
- case TYPE_BITFIELD:
case TYPE_REFERENCE:
case TYPE_FUNCTION:
case TYPE_COMPLEX: