comp.lang.ada
 help / color / mirror / Atom feed
From: convex!pelakh@uunet.uu.net  (Boris Pelakh)
Subject: Is this legal ?
Date: 8 Nov 91 20:58:32 GMT	[thread overview]
Message-ID: <1991Nov08.205832.26958@convex.com> (raw)

The following procedure produces a warning at compile time saying that
the declaration of NULL_LINE is exceeding the storage limit of the 
implementation. At runtime, I get a storage error. It looks like the 
unconstrined declare is causing an attempt to allocate a STRING(1..MAX_INT),
even though I would expect it to only declare a STRING(1..10). The RM
does not explain this particular case. Any ideas ?

--------------

procedure BROKE is
   type VAR_LINE(LENGTH : INTEGER := 10) is
      record
             IMAGE : STRING(1..LENGTH);
      end record;
   NULL_LINE : VAR_LINE;
begin
    null;
end BROKE;

--------------

--
Boris Pelakh            Development Software Test       pelakh@convex.com
"You can see me tonight with an illegal smile. Doesn't cost very much, but
 it lasts a long while ..."		- John Prine, "Illegal Smile"

             reply	other threads:[~1991-11-08 20:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-11-08 20:58 Boris Pelakh [this message]
  -- strict thread matches above, loose matches on Subject: below --
1991-11-09  3:20 Is this legal ? Robert I. Eachus
1991-11-09 18:02 Bud Bach
2021-10-16 19:00 Is this legal? Simon Belmont
2021-10-17  8:35 ` Gautier write-only address
2021-10-17  8:41 ` AdaMagica
2021-10-17 18:31   ` Simon Belmont
2021-10-18 10:50     ` AdaMagica
2021-10-19  3:50 ` Randy Brukardt
replies disabled

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