comp.lang.ada
 help / color / mirror / Atom feed
From: "Raymond W. Magness" <magness@ucla.edu>
Subject: A Win95 GNAT and UNIX GNAT incompatibility
Date: 1996/11/11
Date: 1996-11-11T00:00:00+00:00	[thread overview]
Message-ID: <328825A5.2D@ucla.edu> (raw)


Ladies and Gentlemen,

In the course of finishing this project, I came across a version
incompatibility between Win 95 GNAT and UNIX GNAT.  What I found is:

When you have a function that returns a pointer, UNIX GNAT does not like
it when you immediately use that pointer to access a data element in the
object being pointed to.  Example:

If the function GET_ITEM returns a pointer to an object LINE which is a
record and has a field called DATA.

Do NOT do this in UNIX GNAT (but is ok in Win95 GNAT):
        SOME_DATA := GET_ITEM.DATA;     -- you will get a GNAT Bug
Error!
Unix likes this better:
        LINE_PTR := GET_ITEM;
        SOME_DATA := LINE_PTR.DATA;

I don't know why it does this, but it cost me a couple of hours to
figure it out :(  I hope no one else has had to go through this.
Later...
-- 
Raymond W. Magness
Sergeant, United States Marine Corps
Computer Science, UCLA
magness@ucla.edu 	http://www.seas.ucla.edu/~magness




             reply	other threads:[~1996-11-11  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-11  0:00 Raymond W. Magness [this message]
1996-11-14  0:00 ` A Win95 GNAT and UNIX GNAT incompatibility John English
1996-11-14  0:00   ` Robert Dewar
replies disabled

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