This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] PR C++/24138
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: Josh Conner <jconner at apple dot com>, gcc at gcc dot gnu dot org, jakub at redhat dot com
- Date: Fri, 11 Nov 2005 18:37:14 -0800
- Subject: Re: [RFC] PR C++/24138
- References: <43727B82.7080402@apple.com> <20051110201020.GA14216@redhat.com>
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 of the same precision as the set of valid indices, so edge-case
representations require a little special handling. (Of course, that
whole function is busted if we get an array of a size that can't be
represented in a HOST_WIDE_INT, but that's not your problem...)
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304