Re: [pph] Macro Validation (issue4379044)

2011-04-08 Thread Diego Novillo
On Thu, Apr 7, 2011 at 13:54, Lawrence Crowl cr...@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.


Re: [pph] Macro Validation (issue4379044)

2011-04-08 Thread Tom Tromey
 Lawrence == Lawrence Crowl cr...@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