On Thu, Apr 7, 2011 at 13:54, Lawrence Crowl <crowl@google.com> wrote:
> *************** pth_save_token_cache (cp_token_cache *ca
> *** 448,453 ****
> --- 448,454 ----
> pph_output_uint (f, num);
> for (i = 0, tok = cache->first; i < num; tok++, i++)
> pth_save_token (tok, f);
> +
> }
Extra blank line.
> struct GTY(()) cpp_hashnode {
> struct ht_identifier ident;
> unsigned int is_directive : 1;
> ! unsigned int directive_index : 5; /* If is_directive,
> then index into directive table.
> Otherwise, a NODE_OPERATOR. */
> + unsigned int used_by_directive : 1; /* In an active #if, #define etc. */
> + unsigned int expanded_to_text : 1; /* Produces tokens for parser. */
Hm, and 5 bits are still enough for directive_index?
Diego.
On 4/8/11, Diego Novillo <dnovillo@google.com> wrote:
> On Thu, Apr 7, 2011 at 13:54, Lawrence Crowl <crowl@google.com> wrote:
>> *************** pth_save_token_cache (cp_token_cache *ca
>> *** 448,453 ****
>> --- 448,454 ----
>> pph_output_uint (f, num);
>> for (i = 0, tok = cache->first; i < num; tok++, i++)
>> pth_save_token (tok, f);
>> +
>> }
>
> Extra blank line.
Fixed.
>> struct GTY(()) cpp_hashnode {
>> struct ht_identifier ident;
>> unsigned int is_directive : 1;
>> ! unsigned int directive_index : 5; /* If is_directive,
>> then index into directive table.
>> Otherwise, a NODE_OPERATOR. */
>> + unsigned int used_by_directive : 1; /* In an active #if, #define etc.
>> */
>> + unsigned int expanded_to_text : 1; /* Produces tokens for parser. */
>
> Hm, and 5 bits are still enough for directive_index?
Yes there are enough. I added a comment at the table definition
to ensure that future changes keep it so.
Pushed.
--
Lawrence Crowl
>>>>> "Lawrence" == Lawrence Crowl <crowl@google.com> writes:
Diego> Hm, and 5 bits are still enough for directive_index?
Lawrence> Yes there are enough. I added a comment at the table definition
Lawrence> to ensure that future changes keep it so.
I suggest a static assertion of some kind. Or in lieu of that, maybe
the field's can be made an enum somehow, and then gcc will do the
checking.
Tom
Issue 4379044: [pph] Macro Validation
(Closed)
Created 14 years ago by Lawrence Crowl
Modified 12 years, 10 months ago
Reviewers: Diego Novillo, tromey_redhat.com
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/pph/
Comments: 0