comp.lang.ada
 help / color / mirror / Atom feed
* Missing Index Value in Array Aggregate
@ 2007-09-26 13:21 Charles H. Sampson
  2007-09-26 15:54 ` Adam Beneschan
  0 siblings, 1 reply; 11+ messages in thread
From: Charles H. Sampson @ 2007-09-26 13:21 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-10-03 17:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-26 13:21 Missing Index Value in Array Aggregate Charles H. Sampson
2007-09-26 15:54 ` 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

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