Re: [pph] Macro Validation (issue4379044)

2011-04-08 Thread Tom Tromey
> "Lawrence" == Lawrence Crowl 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, m

Re: [pph] Macro Validation (issue4379044)

2011-04-08 Thread Lawrence Crowl
On 4/8/11, Diego Novillo wrote: > On Thu, Apr 7, 2011 at 13:54, Lawrence Crowl 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_tok

Re: [pph] Macro Validation (issue4379044)

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

[pph] Macro Validation (issue4379044)

2011-04-07 Thread Lawrence Crowl
In my last PPH change, I eliminated the redundancy in the preprocessor identifier lookaside table by removing the name of the identifier from the head of the macro value. This later led to a buffer overrun in libcpp/symtab.c cpp_lt_replay. The buffer was allocated based on the value string size,