> > In Ada, it's quite natural to end up with a dynamically sized object of
> > size 0. For instance, if you declare an array with a dynamic bound:
> > 
> >    Table : Unit_Table (1 .. Last_Unit);
> > 
> > and Last_Unit happens to be 0 at run-time
> 
> But are we expected to read/store from the storage?

No, that shouldn't happen, although you can e.g. reference Table'Address
and expect it to be non null.

> I'd have
> expected that alloca (0) returning NULL shouldn't break
> anything at runtime ...

Not sure exactly what failed here, probably something relatively subtle
(perhaps related to passing this variable or a "slice" of this variable
to another procedure).

Arno

Reply via email to