comp.lang.ada
 help / color / mirror / Atom feed
* X11Ada and GNAT 3.08
@ 1996-10-24  0:00 Mitch Gart
  1996-10-25  0:00 ` jim hopper
  0 siblings, 1 reply; 3+ messages in thread
From: Mitch Gart @ 1996-10-24  0:00 UTC (permalink / raw)



A few users of the X11Ada binding (http://www.inmet.com/~mg/x11ada/x11ada.html)
are finding that the binding has compilation errors with GNAT 3.08 (a new
version of GNAT now in pre-release).  In a little while I will try to make a 
new release of X11Ada which fixes these problems but for now X11Ada and GNAT 
3.08 do not work together.

-- Mitch Gart 




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

* Re: X11Ada and GNAT 3.08
  1996-10-24  0:00 X11Ada and GNAT 3.08 Mitch Gart
@ 1996-10-25  0:00 ` jim hopper
  1996-10-26  0:00   ` Robert Dewar
  0 siblings, 1 reply; 3+ messages in thread
From: jim hopper @ 1996-10-25  0:00 UTC (permalink / raw)



Mitch,

it doesnt appear to work with 3.07 either at least not for me..

jim




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

* Re: X11Ada and GNAT 3.08
  1996-10-25  0:00 ` jim hopper
@ 1996-10-26  0:00   ` Robert Dewar
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Dewar @ 1996-10-26  0:00 UTC (permalink / raw)



Jim Hopper says

"Mitch,

it doesnt appear to work with 3.07 either at least not for me..

jim"


"it" here = the X11Ada bindings,

and that is quite right, the error check that is now detecting a problem
in the X11Ada bindings was introduced in GNAT 3.07. The issue is as follows
by the way.

pragma Convention (C, xxx)

is clearly a representatoin pragma that affects the representation of the
entity xxx. It must therefore come before the freezing point, according
to normal Ada 95 rules. In previous versions of GNAT, this was not checked,
and could in some cases lead to very strange situations. It is still not
checked in the Intermetrics front end, which silently ignores Convention
pragmas that come too late, or accepts them anyway (I am not quite sure
which).

A related issue is the use of pragma Convention on subtypes other than the
first subtype. Again, in the general case at least, pragma COnvention is
clearly a type related beast, rather than a subtype related beast (the
whole design of Ada is to avoid expensive implicit conversions (which
would occur for instance if one subtype of a 2D array type were
convention Fortran, but another was not). GNAT now requires pragma
Convention to apply only to the first named subtype, as for other
type related representation attributes and pragmas. The intermetrics
compiler silently ignores convention applied to other than a first
subtype, which is probably not desirable (although it is certainly more
friendly for the bindings :-)

Anyway, since pragma Convention C does pretty much nothing most of the
time in GNAT, since it is the default, the easy work around is just to
remove the offending pragmas.

Now that these bindings are pretty stable, and are likely to become
part of the ACE, GNAT will be supporting their use, so in future releases
of GNAT, our release procedures will ensure that we have a compatible
version (that is indeed the point of the ACE process of recognizing
some common bindings!)

So the bottom line here is that the bindings have some dubious convention
C pragmas, but we certainly can't complain at Intermetrics for this since
(a) the legality point here is delicate and implementation dependent
(b) no front ends checked the condition.

The bindings are easily fixed, and that will happen soon. Note that in
talks with Tuck, we agreed that pragma Convention should indeed be
regarded as a type specific gizmo, and hence it is likely that the
Intermetrics front end will also diagnose these problems in future.





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

end of thread, other threads:[~1996-10-26  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-24  0:00 X11Ada and GNAT 3.08 Mitch Gart
1996-10-25  0:00 ` jim hopper
1996-10-26  0:00   ` Robert Dewar

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