Re: [RFC] PR C++/24138

2005-11-11 Thread Mark Mitchell
Aldy Hernandez wrote: > (Frustratingly, max_index above yields false on integer_all_onesp(), but > we can tackle that once we can agree what to do here.) > > Is it ok to special case max_index being -1? Definitely. This problem appears in various places; we represent array bounds using a number

[RFC] PR C++/24138

2005-11-10 Thread Aldy Hernandez
More questions wrt this PR. The problem here is in reshape_init_array_1. Ever since we made max_index_cst and index *unsigned* HOST_WIDE_INT, we are causing the loop over initializers to wrongly iterate when we have zero sized arrays. Since on a zero sized array, we have "tree max_index" set to: