This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Somewhat-related changes to expr.c & tree.c


Note that Ada array length calculation is defined as

if first <= last then
   length = last - first + 1
else
   length = 0
end if

AFAIK, there's no way to escape the if to treat properly what the Ada
Reference Manual calls "null range" (all the cases where first >
last). And as Richard mentionned the range can cover Min_Int .. Max_Int.

I don't know for other languages though.

-- 
Laurent Guerby <guerby@acm.org>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]