This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: struct tree_type
- From: Ian Lance Taylor <iant at google dot com>
- To: BLUE 3TOO <blue_3too at hotmail dot com>
- Cc: gcc gcc <gcc at gcc dot gnu dot org>
- Date: Tue, 13 Jul 2010 02:09:11 -0700
- Subject: Re: struct tree_type
- References: <BLU124-W15369170A3892D2461D283C9B90@phx.gbl>
BLUE 3TOO <blue_3too@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.
Ian