comp.lang.ada
 help / color / mirror / Atom feed
From: "W. Wesley Groleau (Wes)" <wwgrol@PSESERV3.FW.HAC.COM>
Subject: Questions on an 83->95 porting detail
Date: 1997/01/24
Date: 1997-01-24T00:00:00+00:00	[thread overview]
Message-ID: <9701242001.AA16557@most> (raw)


Yes, I've seen the answers in print, but I'm having trouble finding it
again... :-)

1. Since a NOTE is not a rule, but only a "consequence of [a] rule
defined elsewhere," what is/are the rule(s) that 12.5.1(28) is a
consequence of?  12.5.1(17) says I need a member of the "class of
all types" but 12.5.1(28) says, "No, you need a member of the
class of all definite types."

2. What is the smallest change to the Ada-83 code for
Heap_Management.Unconstrained so that all of its clients will compile
with Ada 95?  (I'd prefer to change the first generic instead of
over fifty instantiations!)

3. What would be the minimum change to the same code so that all its
clients will work properly with Ada 95?

4. Extra credit if the result is still legal, working Ada-83.... :-)

* heap_management.ads contains:

  generic
    type Item is limited private;
    type Pointer is access Item;
  package Unconstrained is
  -- intended to be used for unconstrained types
  -- an alternate, more efficient, version is offered for constrained types


* string_sequential_limited_unbounded_managed_iterator.ads starts out:

generic
  type Item is limited private;
  type Substring is array (Positive range <>) of Item;

* it also includes:

private
  type Structure is access Substring;


* string_sequential_limited_unbounded_managed_iterator.adb contains:

  package Heap_Management_Operations is
      new Heap_Management.Unconstrained    -- line 42
              (Item => Substring,
               Pointer => Structure);

* gcc makes this complaint:

string_sequential_limited_unbounded_managed_iterator.adb: 42:24:
                          actual for "Item" must be a definite subtype

---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Hughes Defense Communications (MS 10-41)                 Home: 219-471-7206
Fort Wayne,  IN   46808                  (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




             reply	other threads:[~1997-01-24  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-24  0:00 W. Wesley Groleau (Wes) [this message]
1997-01-25  0:00 ` Questions on an 83->95 porting detail Robert A Duff
1997-01-27  0:00 ` Keith Allan Shillington
replies disabled

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