This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Somewhat-related changes to expr.c & tree.c
- To: "Mark Mitchell" <mark at codesourcery dot com>,"per at bothner dot com" <per at bothner dot com>
- Subject: Re: Somewhat-related changes to expr.c & tree.c
- From: "Geert Bosch" <bosch at gnat dot com>
- Date: Mon, 20 Nov 2000 17:58:39 -0500
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Reply-To: "Geert Bosch" <bosch at gnat dot com>
On 19 Nov 2000 22:12:19 -0800, per@bothner.com wrote:
A representation I've thought made sense was to represent a range or
index type using two values:
* lower bound, type is that of index values.
* size of range (number of elements), type is an unsigned sizetype.
This is close but we still would not have enough information to tell
an array spanning the entire memory apart from one with zero length.
Also, this would not allow Ada array limits like -3 .. -5. It seems
unavoidable to me that we need an extra bit in addition to two indices
or an index and a size.
If we're going to use an extra bit to mark an empty range, we could
use the most straightforward method of having a lowerbound and an
upperbound indexing the first and the last element of the array.
-Geert