On Mon, 06 Oct 2008 22:00:01 +0200, Joel Brobecker wrote: > > +enum field_loc_kind > > + { > > + FIELD_LOC_KIND_BITPOS, /* bitpos */ > > Is it worth forcing the value of FIELD_LOC_KIND_BITPOS to zero? > > FIELD_LOC_KIND_BITPOS = 0, > > (this is where my lack of knowledge of C shows up) No, according to ISO C99 enums with no assignments get values 0, 1, 2... > int > field_is_static (struct field *f) > { > /* "static" fields are the fields whose location is not relative > to the address of the enclosing struct. It would be nice to > have a dedicated flag that would be set for static fields when > the type is being created. But in practice, checking the field > loc_kind should give us an accurate answer (at least as long as > we assume that DWARF block locations are not going to be used > for static fields). FIXME? */ > return (FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSNAME > || FIELD_LOC_KIND (*f) == FIELD_LOC_KIND_PHYSADDR); > } Included. FIELD_LOC_KIND_DWARF_BLOCK could be even asserted-out as the current patchset uses FIELD_LOC_KIND_DWARF_BLOCK only for TYPE_CODE_RANGE fields (low/high/stride) upon whose field_is_static() is never called. > Can we replace the "FIELD_STATIC_KIND = 0" line by "SET_FIELD_BITPOS > (*fp, 0);" and then remove the "else" part below? Done. Included you as a co-author of this patch. OK to apply? Regression-tested only on x86_64-unknown-linux-gnu. Thanks, Jan