This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: struct tree_type


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]