More on type sizes

Per Bothner per@bothner.com
Fri Dec 31 23:54:00 GMT 1999


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

> No, I meant what code handles generating code for ARRAY_REF of such
> types?   We shouldn't be making types that we can't generate code for!

Chill doesn't generate ARRAY_REF for bit arrays/string.
Instead, it generates PACKED_ARRAY_REF, which is defined in
ch/ch-tree.def.

I mentioned before, but this may be the right time to do so again:
The macro TYPE_MAX_VALUE is mis-designed, because it does not work
well for empty ranges.  It would be better to use TYPE_MIN_VALUE
having the value of the appropriate type, and replace TYPE_MAX_VALUE
by a new macro called something like TYPE_RANGE_SIZE.

The invariant is that all instances of TYPE_MAX_VALUE(x)
would be replaced by the sum of TYPE_MIN_VALUE and TYPE_RANGE_SIZE.
However, while the type of TYPE_MAX_VALUE is that of the range type
(except in the case of empty ranges!), the type of TYPE_RANGE_SIZE
is the appropriate size type.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/



More information about the Gcc mailing list