[Bug middle-end/56474] [4.8 regression] bogus Storage_Error raised for record containing empty zero-based array

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 4 15:39:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56474

--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-03-04 15:38:53 UTC ---
> Hm, if hb < lb - what kind of pair do you expect?  The only case
> where lb - 1 is the "upper bound" (whatever upper bound is for an
> empty array ...) - isn't lb - 1 always equal to hb in that case,
> thus are not hb and lb one element apart for empty arrays (length == 0)?

No, you can have "superflat" arrays and they need to have zero length (instead
of a negative one) in Ada, hence the formula.



More information about the Gcc-bugs mailing list