Patch for C++ bug 24009

Mike Stump mrs@apple.com
Sat Aug 26 14:36:00 GMT 2006


Looks good.  Read on for some exceedingly minor issues...

On Aug 26, 2006, at 5:46 AM, Joseph S. Myers wrote:
> +  gcc_assert (!input_file_stack_restored);
> +  if (input_file_stack_tick == 0x7fffffff)
> +    sorry ("GCC supports only %d input file changes",  
> input_file_stack_tick);

How about clamping at the max and using an empty stack at the max,  
that way, we can still compile programs (don't have to document or  
explain the arbitrary limit), while only sacrificing diagnostic  
fidelity past a whole lot of changes.  I don't think this is a big  
deal as the limit is kinda high.

Too bad sizeof doesn't give us the size in bits, then we could use  
1<<sizeof(input_file_stack_index) instead of 0x7fffffff.  I have a  
slight preference for those two numbers to be more strongly connected.



More information about the Gcc-patches mailing list