comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Yet another gnat/TFFE difference
Date: 1999/05/22
Date: 1999-05-22T00:00:00+00:00	[thread overview]
Message-ID: <7i4vjh$n4t$1@nnrp1.deja.com> (raw)

I have found one last difference between Gnat and Tucker's favorite
front end (both Aonix and GreenHills variants). This one has to do with
array slicing and type conversions. Assume I have the following code:


type T1 is array (1..2250) of Float;
O1 : T1;

type T2 is array (1..5) of Float;
O2 : T2:

...

O2(1..2) := T2 (O1 (2..3));


Gnat has no problem with this, which makes sense as the slices are the
same size and the base type of the arrays are the same.

TFFE compilers blow up with a constrataint error here. I'm gessing that
is because objects of type T2 have to be 5 elements long, but my slice
is 2 elements.

I have two questions here: First off, which vendor gets the bug
report? :-)

Secondly, does anyone have any good ideas about how to make the TFFE
compilers happy? It doesn't make sense that I should have to make two
separate assignments to do this. I know making T1 a subtype of T2 would
work. But in the environment this came up in that is not a feasable
solution (T2 is actually sized based on generic-derived parameters that
are only known at runtime).

--
T.E.D.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---




             reply	other threads:[~1999-05-22  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-22  0:00 dennison [this message]
1999-05-22  0:00 ` Yet another gnat/TFFE difference Keith Thompson
1999-05-22  0:00   ` dennison
replies disabled

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