comp.lang.ada
 help / color / mirror / Atom feed
From: csampson@inetworld.net (Charles H. Sampson)
Subject: Missing Index Value in Array Aggregate
Date: Wed, 26 Sep 2007 06:21:57 -0700
Date: 2007-09-26T06:21:57-07:00	[thread overview]
Message-ID: <1i50iqb.14r2zb11w8eyc2N%csampson@inetworld.net> (raw)

     The compiler used in my work allowed an aggregate for
an array with an elaboration type index to omit one of the
index values.  (There was no others choice.)  As a result,
Constraint_Error was raised at library elaboration time,
which is a nasty bug to run down in this environment.

     I was getting ready to file a bug report, certain
that this was a compile-time error rather than run-time,
when I decided to take a close look at that old LRM.  I
was surprised to find that the legality rules of 4.4.3
appear to be designed to allow just that, particularly the
second clause of paragraph 18.

     Does anyone know what the purpose of this is?  I can
see that there's an occasional need for it, as in the case
of an aggregate for a formal parameter of an unconstrained
array type.  It certainly seems to me that in the case of
an aggregate for a constrained array object, catching this
error at compile time in is line with Ada's concept of
doing as much as possible at compile time.  Or am I wrong?
Are there other paragraphs that do require this to be
caught during compilation?

               Charlie



             reply	other threads:[~2007-09-26 13:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-26 13:21 Charles H. Sampson [this message]
2007-09-26 15:54 ` Missing Index Value in Array Aggregate Adam Beneschan
2007-09-26 23:33   ` Randy Brukardt
2007-09-28  3:21     ` Charles H. Sampson
2007-09-28 10:05       ` Stephen Leake
2007-09-28 10:26         ` Ludovic Brenta
2007-09-28 16:21           ` Pascal Obry
2007-09-28 20:26             ` Maciej Sobczak
2007-10-03 17:01               ` roderick.chapman
2007-09-29 15:31         ` Charles H. Sampson
2007-09-30 11:02           ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox