This is the mail archive of the gcc@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] |
| Other format: | [Raw text] | |
Laurent GUERBY wrote:
if Dynamic_N >= T'First and Dynamic_N > T'Last thenHuh? I can't understand the first comparison. Actually Ada is not Fortran-66 and allows empty loops, no?
Ada for loop over "A .. B" will be empty if "A > B" and we obviously must not raise an exception if the loop is empty hence the first comparison is equivalent to "not (T'First > Dynamic_N)" which is true when the loop is not empty.
GNAT does not do this kind of hoisting, though this particular case could be fiddled in the front end.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |