On 13 July 2010 11:09, Ian Lance Taylor <i...@google.com> wrote: > BLUE 3TOO <blue_3...@hotmail.com> writes: > >> Can somebody quickly explain what the bit fields are for? thanks >> >> unsigned int precision : 10; >> unsigned no_force_blk_flag : 1; >> unsigned needs_constructing_flag : 1; >> unsigned transparent_aggr_flag : 1; >> unsigned restrict_flag : 1; >> unsigned contains_placeholder_bits : 2; >> ENUM_BITFIELD(machine_mode) mode : 8; >> unsigned string_flag : 1; >> unsigned lang_flag_0 : 1; >> unsigned lang_flag_1 : 1; >> unsigned lang_flag_2 : 1; >> unsigned lang_flag_3 : 1; >> unsigned lang_flag_4 : 1; >> unsigned lang_flag_5 : 1; >> unsigned lang_flag_6 : 1; > > Look for the uses of the bitfields in the macros in tree.h, and look at > the comments on those macros. Never refer to the fields directly; > always use the macros. > > E.g., no_force_blk_flag is used in two macros, TYPE_NO_FORCE_BLK and > TYPE_IS_SIZETYPE, and the comments explain when those macros are valid > and what they mean. > > The lang_flag_N fields are used for frontend specific purposes, so for > them you have to look at the individual frontends.
Blue_3too, an improvement would be to submit a patch adding the above explanation as comments before the bitfields (where you would have expected to find such explanation). Such a small patch does not require copyright assignment, just send it to gcc-patches with a changelog. Cheers, Manuel.